rpmbuild prepares RPM packages (see the rpm tag) from scenarios also knowsknown as spec-files. spec-files providesprovide information to rpmbuild about necessary steps which should be executed to produce RPM packages.
In general, RPM preparing routine consists of the following steps:
Creating of building environment:
mkdir ~/rpmbuild mkdir ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} # Directories summary: # # BUILD in this directory source code will be buildingbuilt # BUILDROOT in this directory software will be installed before packing in the package # RPM RPMS this directory contains completed (binary) RPM packages # SOURCES where you should put the sources for the application # SPECS where you should place the spec file(s) # SRPMS this directory contains completed source RPM packagesPutting source files tointo the
~/rpmbuild/SOURCESdirectory.Putting
spec-files tointo the~/rpmbuild/SPECSdirectory.Running
rpmbuild <options>options /path/to/spec/file.
Good andSee also the rpmbuild(8) man page and detailed instructioninstructions in the Fedora RPM GuideFedora RPM Guide.