Linux Step By Steps

Building (source) SRPMs
Written by Tom Wilson on 16-July-2003

Done on Redhat 9. It is the same for RH 8. I haven't checked RH7.3 It should also be similar for any of the rpm-based distros. You will also have to have the kernel-headers and kernel-source installed.

1. Find and download the source rpm you want to build. (e.g. foo.bar-1.0.src.rpm)

2. Open a terminal session and su to root. Then cp the src.rpm from where ever you downloaded it to, most likely /home/<username>, to the /usr/src/redhat/SRPMS directory. *Note: Switch Redhat to what ever
your distro has (e.g. Mandrake).

3. Cd into the /usr/src/redhat/SRPMS directory.

4. Now start the compile. Type: rpmbuild --rebuild foo.bar-1.0.src.rpm

5. That will spew much information about the compile on the screen.  After a successful compile, you should now have foo.bar-1.0.i386.rpm in the /usr/src/redhat/RPMS/i386 directory.

6. Cd into /usr/src/redhat/RPMS/i386 and install like any old rpm.
rpm -Uhv foo.bar-1.0.i386.rpm



searchSearch Index