Creating rpms for gnustep software


Author: Nicola Pero

Date: 10 April 2001

0. General Remarks
1. Packaging gnustep-make
0. Packaging other gnustep software

General remarks


GNUstep software is not different from other software, so you can always generate rpms for it by hand if you want. In that case, you don't need this document. This document rather talks about using gnustep-make to automatically generate specfiles and ultimately rpms for you with the least possible labour.

As an exception, because this facility is provided by gnustep-make, it can't be used to build gnustep-make itself, which has to be built by hand.

Packaging gnustep-make


GNUstep-make is straightforward to package:
  1. Edit the gnustep-make.spec.in file.
  2. Run ./configure; it will generate a gnustep-make.spec file.
  3. Create the RPM using this spec file as usual.
Once you have packaged it, you need to install it before you can package anything else.

Packaging other gnustep software

Editing the spec.in file

The first thing you need to do to package gnustep software into RPM is to create (or edit) a spec.in file. General instructions are in the rpm.make file in the gnustep-make package; the simplest thing is to take a spec.in file from some existing software (for example, the gnustep-base.spec.in from the gnustep-base distribution) and modify it.
Setting up the GNUmakefile

Then, you need to make sure that the top GNUmakefile for the project contains the appropriate variable definitions. The ones which are always needed are PACKAGE_NAME and VERSION. For example, the jigs's top level GNUmakefile contains the following lines:
PACKAGE_NAME = jigs
VERSION = 1.2.6
the PACKAGE_NAME must be the same name as your RPM.
Generating the specfile

Now all should be ready. Typing
make specfile
should generate a specfile (for example, gnustep-base.spec) from the spec.in file (for example, gnustep-base.spec.in).
Generating the .tar.gz

Typing
make tgz
should generate the .tar.gz file in the parent directory. Using the generated .tar.gz and specfile, you can now generate the RPM in the standard way.
Generating the rpm in a single jump

You can generate the rpm in a single jump by becoming root, and giving the following commands:
export RPM_TOPDIR=/usr/src/redhat
make rpm
Of course, you need to replace /usr/src/redhat with the top directory of your rpm build area. This command will build the specfile, the .tar.gz, and then copy both in the appropriate places and run rpm.
Generating debugging rpms

Debugging versions of the packages can be built in a similar way. The main differences are:
  1. Instead of the file called, say, gnustep-base.spec.in, you need to edit gnustep-base-debug.spec.in;
  2. Type make debug=yes specfile to generate the specfile for the debugging package;
  3. Type make debug=yes rpm to generate the rpm for the debugging package in a single jump.