Product SiteDocumentation Site

Customizing the build

You can customize the rpmbuild command with the options listed in Table A-11.
Table A-11 Extra build options for the rpmbuild command
-?, --help
Print the popt help information for all the command-line options
--buildroot directory
Override the default root directory for building with directory.
Remove the build tree after building
-D, --define 'macro value'
Define the given macro to hold the given value
--dbpath path_to_rpm_db
Use the given directory for the RPM database instead of the default
-E, --eval expression
Print the evaluation of the given expression
--macros file:file:file
Read the given colon-separated files as the macro files to define RPM macros; only the first file must exist
Don't really build anything, which really tests the spec file
--pipe command
Pipe the output of the rpm command to the given command
Provide less output, normally show only errors
--rcfile file:file:file
Read the given colon-separated files as the rc files to define RPM settings; only the first file must exist
Remove the sources after the build
Remove the spec file after the build
--root directory
Use directory as the top-level directory instead of /
With the -bc or -bi options, jumps directly to the given stage and just executes that stage
Print the rpmrc and macro configuration and exit
Sign the package with a GPG signature
--target platform
Build for the given platform. May not work if you don't have the other platform build commands, such as cross compilers, set up. Can work for Intel platforms with i386, i686, and so on.
-v, --verbose
Provide more verbose output
Provide even more verbose output, including debugging information
Print the RPM version and exit