Simple RPM builds from SRPM - command sequence
This tutorial assumes you have a file containing sources of RPM package (file with .src.rpm extension) and you want to build binary RPM which you can then install.
There are several ways how to build srpm. Let's take a look at some of them.
# yum install rpm-build yum-utils # su - <user> $ rpm -i <package>.src.rpm $ cd ~/rpmbuild/SPECS $ sudo yum-builddep <package>.spec $ rpmbuild -ba <package>.spec # now your rpms are in ../RPMS and src.rpm in ../SRPMS
# yum install mock # usermod -a -G mock <user> # su - <user> # mock -r CONFIG_FILE <package>.src.rpm # mock will tell you where your packages are
Details and description