Preface
If you use an rpm based distribution, you may sometimes prefer to create
a binary rpm package and install it on all your machines instead of
individual installations using "make install" to a local place.
Creating rpm packages from any given released tarball or a cvs tree is
automated in FVWM. The same instructions may be applied to 3 projects
fvwm, fvwm-themes and wm-icons. The official rpm
packages for these projects can be found on this
rpm page.
Before you begin
You should install
rpm-build
package.
You should install all -devel packages needed for building.
The exact list depends on the features you want to build in (running
./configure should help to get an idea about all optional features).
If you are going to install your newly built rpm on other machines, you
should have both somelib and somelib-devel rpm packages
installed on your system and only somelib installed on these other
systems. Don't use non rpm installed stuff unless you know what you do.
Depending on your distribution the packages may be (some are optional):
It is suggested that you create rpm packages on a stock or almost a stock
system (this is a requirement for the official rpms), but this is not really
needed. You should just verify that all dependancies of the newly created rpm
may be found by users of your rpm. For example, if you have a symlink of
/usr/local/bin/perl to the actual /usr/bin/perl the created
rpm will require an executable that is not a part of any standard package.
To avoid this, set environment variable PERL in your shell
to /usr/bin/perl before creating rpms.
What version will be packaged
If you want to create an rpm from a given tarball, unpack it and
cd to the top fvwm-x.y.z directory. Alternativelly you may
just move this tarball to some working cvs tree or another unpacked tree.
If you use cvs and want to create the rpm of the current cvs snapshot,
you should skip this step.
If you use cvs and want to create the rpm of some specific version
x.y.z in the past or the future, first
update the cvs tree to this version by executing:
cvs update -r version-x_y_z
for example version-2_5_4. This creates sticky tags that are ok
if you use this cvs tree for updating to final (tagged) releases only.
If you use it for anything else, you may want to remove sticky flags
by "cvs update -A" after creating rpms.
Where rpms will be created
By default, the resulting rpms are created in the system's directory
that varies from one rpm-based distribution to another. You usually need root
permisions to create files in this directory.
But this is not really needed, you may create rpms as a regular user.
To do this, create ~/.rpmmacros file that has one line:
%_topdir /home/user/redhat
Note that both binary and source rpms will be created and they will
sit in different subdirectories, like ~/redhat/RPMS/i386/ and
~/redhat/SRPMS/.
Creating binary and source rpm packages
Hopefully you are in the top directory after the previous steps.
If you don't have Makefile, run ./configure. If you don't
have configure, produce it as described on the
cvs information page.
Creating binary and source rpm packages is as simple as executing:
make rpm-dist
This should create two files like
RPMS/i386/fvwm-<version>-<release>.i386.rpm and
SRPMS/fvwm-<version>-<release>.src.rpm.
Don't distress if it will not work for you from the first run. This usually
means that you didn't install something or you don't have permissions or
something like this. Investigate an error and complete the previous steps.
If you are really stuck, ask on the mailing lists.
If you already have a correct fvwm-x.y.z.tar.gz file in the top
directory (not the parent directory), because you either downloaded the
released tarball or symlinked it or executed "make rpm-dist" or "make dist"),
you may shorten the process by executing the following instead:
make rpm-this
By default the release name is 0.YYYYMMDD, like 0.20021207.
To change it specify:
make rpm-dist release=test1
You may pass make and configure options that will
be used when rpm is created like shown here:
make rpm-dist cparams='--disable-xrender --quiet' mparams='CFLAGS="-O2 -g"'
Finally, if you want to create rpm packages for a tarball with a version
different than the current top directory version, you may do this by:
make version=2.3.22 release=2 rpm-this
Good luck.
|