How to Build an rpm from a source rpm on Fedora Linux

By | 2013/12/28

Here is how you can build an rpm from a src.rpm on Fedora!

1. First install some needed packages:

$ sudo yum install @development-tools

$ sudo yum install fedora-packager

2. Next, as regular user (_not_ root) type this command with your src.rpm:

$ rpm -ivh package.src.rpm

3. Next, go to the following directory:

$ cd rpmbuild/SPECS/

4. Now build the rpm package.

$ rpmbuild -ba thepackage.spec

5. rpms are then available in rpmbuild/RPMS/x86_64/ (for 64bit, as an example).

$ cd rpmbuild/RPMS/x86_64/

Install with tack i:

$ sudo rpm -i thepackage.rpm