To build a product from a source RPM Package Manager (SRPM), do the following:
Install the SRPM:
Enter the following:
# rpm -ihv /mnt/cdrom/SRPMS/package_version.src.rpm package |
For example, to install lconsole:
# rpm -ihv /mnt/cdrom/SRPMS/lconsole-1.1-1.src.rpm lconsole |
The contents of the SRPM will be installed on the system in the /usr/src/redhat/SOURCES directory. The contents of the SRPM may be compressed tar files (tarballs) and/or patch files.
Create a build directory and change directories to it:
# mkdir /tmp/build # cd /tmp/build |
Move the tarball and/or patch files to the build directory. For example:
# mv /usr/src/redhat/SOURCES/lconsole-1.1.tar.gz /tmp/build |
Uncompress the tarball and extract the files:
# tar zxvf tarball |
For example:
# tar zxvf lconsole-1.1.tar.gz |
Change to the package's directory. For example:
# cd lconsole-1.1 |
If there are patches that you want to apply, enter the following:
# patch -p0 <patchfile |
For more information, see the patch(1) man page.
# make |