initCommon(); $template->displayHeader(); ?>

22.4. File Tags

The %files tag lists the files your package should install. For example:

%files

%defattr(-,root,root)

/usr/X11R6/bin/xtoolwait

/usr/X11R6/man/man1/xtoolwait.*

You should mark configuration and documentation files with %config and %doc, respectively. For example:

%files

%defattr(-,root,root)

/sbin/ypbind

%{_mandir}/*/*

%config /etc/rc.d/init.d/*

%config /etc/yp.conf

%dir /var/yp

%dir /var/yp/binding

%doc README NEWS

22.4.1. Making relocatable packages

You can make a relocatable package by setting up one or more Prefix tags. For example:

Prefix: /usr

Prefix: /etc

Each file in the %files section must then start with one of the prefixes you provided. With this, installers can easily relocate the package with a command like the following:

# rpm --relocate /etc=/usr/etc file_name.rpm

displayFooter('$Date: 2005/11/02 19:30:07 $'); ?>