Before I begin, there are some tools that I need to have in order to create a packaging environment.
- rpm-build (Build RPM Packages)
- rpmdevtools (RPM Development Tools)
- rpmlint (A tool for checking common errors in rpm packages)
su-
input root password
yum install rpm-build
When finished, install rpmdevtools by using same yum command.
yum install rpmdevtools
And do the same for rpmlint.
yum install rpmlint
And lastly, run the following command to automatically build the directories in your home directory.
rpmdev-setuptree
If the above command ran successfully, it should have created following directories in your home directory.
Next step is to download a source rpm package. I'm going to try using NLED again. And I'm going to try yumdownloader command to download source rpm file automatically.
yumdownloader --source nled
So now I have nled-2.52-6.fc12.src.rpm file downloaded in my home directory. To install this file, use the following command.
rpm -i ~/nled-2.52-6.fc12.src.rpm
~/rpmbuild/SOURCES directory hold the installed source tarballs. ~/rpmbuild/SPECS directory hold the installed spec files. A spec file for a package is used to hold specific procedures and information about how a package should be built with the source code. I will take a look at understanding/editing/creating spec files in my later blog post. For now, to rebuild from the spec file,
cd ~/rpmbuild/SPECS/
rpmbuild -ba nled.spec
No comments:
Post a Comment