Building rpm packages

2016-02-22 - How to build locally an rpm package
Tags: Centos rhel

Setup your environment

First of all, you have to use a non-root account.

Building package

There are several ways to build a rpm, depending on what kind of stuff you have to deal with.

Building from a tar.gz archive containing a .spec file

Run the following on you .tar.gz archive : rpmbuild -tb memcached-1.4.0.tar.gz. When the building process ends, you will find your package in a $HOME/rpmbuild/RPMS/x86_64/ like directory, depending on your architecture.

Building from a spec file