3.14. Building source RPMs
The following procedure describes how to build a source RPM.
- A SPEC file for the program that we want to package must already exist.
rpmbuildcommand with the specified SPEC file:
$ rpmbuild -bs SPECFILE
Substitute SPECFILE with the SPEC file. The
-bsoption stands for the build source.
The following example shows building source RPMs for the
Building source RPMs for bello, pello, and cello.
$ cd ~/rpmbuild/SPECS/ 8$ rpmbuild -bs bello.spec Wrote: /home/admiller/rpmbuild/SRPMS/bello-0.1-1.el8.src.rpm $ rpmbuild -bs pello.spec Wrote: /home/admiller/rpmbuild/SRPMS/pello-0.1.2-1.el8.src.rpm $ rpmbuild -bs cello.spec Wrote: /home/admiller/rpmbuild/SRPMS/cello-1.0-1.el8.src.rpm
Make sure that the
rpmbuild/SRPMSdirectory includes the resulting source RPMs. The directory is a part of the structure expected by