The easiest way to build binary packages from src packages is with pkgbuild. The outcome is better performance.
If you have used RedHat Linux (or other package-based distributions), I’m sure you have used .rpm (RedHat Package Manager) packages. You may have noticed i386, i486, i586, i686, or athlon lurking in the filename as well. This notation refers to the processor type (architecture) the package was built to support.
Sometimes, you cannot find a package to match your architecture. You can use a lower-numbered package or try building.
In this example, I use the fictional ‘noname’ package. Also, you should replace ‘i686’ with an appropriate architecture.
As root, or sudo:
rpmbuild --target i686 --rebuild noname-0.0.1.src.rpm
This process may take a while, depending on the package. It involves installing the src package to /usr/src/redhat/SOURCES, running configure, and running make.
Look in /usr/src/redhat/RPMS/i686 for the completed binary .rpm package. These packages can be installed with the following:
cd /usr/src/redhat/RPMS/i686
rpm -ivh noname-0.0.1.i686.rpm
or updated with as follows:
cd /usr/src/redhat/RPMS/i686
rpm -Uvh noname-0.0.1.i686.rpm
Note: Some packages may not pertain to a specific architecture. These may be found in the /usr/src/redhat/RPMS/noarch.