Wednesday, July 08, 2009

Building RPMS, part one

The following is an excerpt from the IRC Packaging Lesson ; in red instructions for root (please use sudo - never use a system as root):

  • yum groupinstall development-tools

  • yum install rpm-build rpmdevtools

  • rpmdev-setuptree

The last command will setup the following directories:

rpmbuild directory tree

BUILD


This directory will contain the build of the source code you want to package. Roughly equivalent to the directory where you tar xjf source.tarball.bz2 ; cd source.tarball ; .configure ; make

BUILDROOT


The directory where the package will be built.

RPMS


The rpm produced will end in this directory. This is the binary rpm, the one you want to install in the system to use that cute application of yours.

SOURCES


Tarballs will end up here. These are the .gz or bz2 downloaded to build the application; usually contains source files, in the common autotools format.

SPECS


Spec files are the files which define how to package software, which dependencies to look for, and some more stuff. It's the only file you need (apart from source code) to really build a package.

SRPMS


SRPMS files are RPMS which contain source and SPEC file to rebuild packages with rpm.

OK, right now I will close the entry. A new one in a few days.
Post a Comment