Wednesday, February 10, 2010

rpmbuild: First Attempt

After playing around with Apache, I decided to go with a simpler package to build. I decided I would try irssi, which is an IRC chat client. In order to package the IRSSI client I first started by obtaining the tarbal from
http://www.irssi.org/files/irssi-0.8.14.tar.gz. I then extracted
irssi, and looked for files like, "LICENSE, INSTALL, README,
ChangeLog, Makefile" as these are all very important when building the
SPEC file. Before I started building the SPEC file I set up the RPM tree using, "rpmdev-setuptree". This will make
a nice safe area to build RPMs. The rpmbuild directory
was created under ~/rpmbuild. The tarbal needed to be moved to
~/rpmbuild/SOURCE directory. Then the "rpmdev-newspec [packagename.spec]" command is
issued, which will create a bar bones SPEC file that you can fill out
based on the information gathered earlier in the tarball. I found
that reading http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo
was fairly helpful to understanding what section means what. Once the
SPEC file is filled out the "rpmbuild -ba packagename.spec" is issued.
Initially I found some errors, and resolved them. after this we issued the rpmlint [packagename]. I had no errors, however I had a warning which was because of trailing spaces.

No comments:

Post a Comment