23
2008
General instructions to rebuild a Fedora source rpm.
Note: This example uses the vlc source rpm, but it doesn’t work on my Fedora 8 system because there are problems installing dependencies, but the general commands should work on other packages
- Install build tools
su -c 'yum install yum-utils rpmdevtools'
- Download source package. Either use yumdownloader to download from an existing repository:
yumdownloader --source vlc
or download directly from a server
wget -nd ftp://ftp.pbone.net/mirror/rpm.livna.org/fedora/development/SRPMS/\ vlc-0.9.0-0.5.20080802git.lvn10.src.rpm
- Install the source package. This will unpack the source into your /$HOME/rpmbuild directory.
rpm -Uvh vlc-0.8.6i-1.lvn8.src.rpm
- Install build dependencies for the source package
su -c 'yum-builddep vlc-0.8.6i-1.lvn8.src.rpm'
- Edit the spec file
cd ~/rpmbuild/SPECS vim vlc.spec
- Add the new source package
cd ../SOURCES wget -nd http://download.videolan.org/pub/videolan/vlc/0.9.2/vlc-0.9.2.tar.bz2
- Build the rpm
cd ../SPECS rpmbuild -bb vlc.spec
- Install the rpm
cd ../RPMS/x86_64 rpm -Uvh vlc-0.9.2.fc8.x86_64.rpm
References:
Building a kernel from the src rpm
Fedora rpm guide
