Product SiteDocumentation Site

10.5.2. Define the files section

When you use a Prefix: directive in your spec file, all files in the %files section must be under the directory named with the Prefix: directive. For example, from the jikes compiler package:
Prefix: /usr
%doc /usr/doc/jikes-%{version}/license.htm
%doc /usr/man/man1/jikes.1*
In this example, all the files are under the /usr directory. All files in the %files section must be located under one of the Prefix: directories. If you have more than one top-level directory, such as /usr and /etc, define more than one Prefix: directive. For example:
Prefix: /usr
Prefix: /etc
Cross Reference
Chapter 3, Using RPM covers how to install or upgrade packages into different directories using the --relocate and --prefix options.