Product SiteDocumentation Site

9.2.2. Storing spec files on disk

As discussed in Chapter 8, Creating RPMs: An Overview , the rpmbuild command expands source RPMs to the /usr/src/redhat directory. Under this directory, the RPM system assumes five subdirectories, listed in Table 10-1.
Table 10-1 Default RPM directories
Where the rpmbuild command builds software
Where the rpmbuild command stores binary RPMs it creates
Where you should put the sources for the application
Where you should place the spec file
Where the rpmbuild command places source RPMs
The spec files you create should be stored in the SPECS directory while building RPMs. (You can store your spec files permanently in any location you desire.)
Cross Reference
These directories are the default directories. See Chapter 22, Spec File Syntax for changing RPM default values. In addition, these are the defaults for Red Hat Linux. See Chapter 18, Using RPM on Non-Red Hat Linuxes and Chapter 18, Using RPM on Non-Red Hat Linuxes for discussions on other versions of Linux and other non-Linux operating systems, respectively.
With the knowledge of the spec file syntax covered in the preceding section, you can start to write spec files. The first step is to define the basic package information.