Product SiteDocumentation Site

The files section

Finally, the files section lists the files to go into the binary RPM, along with the defined file attributes. For example:
%doc /usr/doc/jikes-%{version}/license.htm
%doc /usr/man/man1/jikes.1*
The files section starts with a %files statement
The %doc macro marks certain files as documentation. This allows the RPM to distinguish the files holding documentation from the other files in the RPM.
Cross Reference
This example skips the install and uninstall script sections, as well as a verification section. There are also no triggers defined in this RPM spec file. All of these topics are covered in Chapter 9, Working with Spec Files and Chapter 10, Advanced RPM Packaging.
Once you have written your spec file, and placed the files in the SOURCES and SPECS directories under /usr/src/redhat, you’ll see files like the following:
$ ls –CF /usr/src/redhat/*
athlon/ i386/ i486/ i586/ i686/ noarch/
That is, with a clean system and no other RPMs being built, you'll see a spec file in /usr/src/redhat/SPECS and the sources in /usr/src/redhat/SOURCES. In this example, the sources are in a compressed tar archive. (For this, the RPM spec file, jikes.spec needs to have a command in the prep section to extract the files.)
You should now be ready to build an RPM.