Product SiteDocumentation Site

Naming directories of files

In addition to using wildcard globs, you can specify whole directories as part of your package. For example:
This example names all the files in the directory /etc/xtoolwait as part of the package. Be very careful when listing this directory. Do not include a system directory such as /usr/bin, as RPM will assume your package owns all of /usr/bin, which contains hundreds of commands. This can be a problem when you try to remove a package.
It is OK to name a subdirectory that your package owns. For example, while /etc is a system directory, /etc/xtoolwait is a reasonable directory for the xtoolwait package to control.
If you just want to include an empty directory in the package, and not the files within the directory, use the %dir directive in front of the directory name. For example:
%dir /etc/xtoolwait
This example states that the package contains the /usr/X11R6/bin/xtoolwait program and the empty directory /etc/xtoolwait.
In addition to the straight list of files or directories, RPM provides other options, starting with marking certain files as documentation or configuration files.