The rpmbuild command is used to build RPM packages. The syntax for rpmbuild is:
Specify -b to build a package directly from a spec file, or -t to open a tarred, gzipped file and use its spec file.
Both forms take the following single-character stage arguments, which specify the stages, or steps, required to build a package. The stages are listed in the order they would be performed:
Perform the prep stage, unpacking source files and applying patches.
Do a list check, expanding macros in the files section of the spec file and -verifying that each file exists.
Perform the prep and build stages; generally equivalent to doing a make.
Perform the prep, build, and install stages; generally equivalent to doing a make install.
Perform the prep, build, and install stages, then build a binary package.
Build a source package.
Perform the prep, build, and install stages, then build both binary and source packages.
The difference between the build stage, which is one of the early steps, and building a binary package in b or ais the difference between building a working binary for the software and putting all the pieces together into a final rpm package.