Build from RedHat source package (.src)

Contributor Icon Contributed by abanks Date Icon October 27, 2003  
Tag Icon Tagged: Linux

Build binary packages from src packages with pkgbuild. Better performance and easy to do!


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, however. You can use a lower-numbered package, or try building!

In this example, I will use the fictional ‘noname’ package. Also, replace ‘i686′ with an appropriate architecture.

As root, or sudo:
rpmbuild --target i686 --rebuild noname-0.0.1.src.rpm

Go get a cup of coffee. This process may take a while, depending on the package. This process 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:

cd /usr/src/redhat/RPMS/i686
rpm -ivh noname-0.0.1.i686.rpm

or updated with:
cd /usr/src/redhat/RPMS/i686
rpm -Uvh noname-0.0.1.i686.rpm

Note that some packages may not pertain to a specific architecture - these may be found in the /usr/src/redhat/RPMS/noarch

Previous recipe | Next recipe |
 

 
close Reblog this comment
blog comments powered by Disqus