$Id: packaging-howto,v 1.4 2001/06/20 22:34:45 pkot Exp $

The gnokii Packaging HOWTO


PURPOSE

Read this document if you want to build gnokii binary packages for your
system or repackage gnokii for a system that is not yet supported.


GENERAL POLICY

For more install/compilation information see the INSTALL file.

Makefiles support 'make install prefix=<your_directory>' for package
building.  For example, in .spec:

	./configure --prefix=/usr

	make install prefix=$RPM_BUILD_ROOT/usr

(You do not need to create any directories - just 'make && make install'.)

For installation procedures use 'make install' or 'make install prefix=',
and verify that all outputs from the procedure are correct.

Please, DO NOT make any corrections using your package-specific build
system (for example, using 'cp' in packaging scripts like .spec).
Installation is a job for Makefiles.  Writing different installation
procedures for different packaging systems is the road to hell...

The only exception to the above rule is documentation.	'make install'
does not install documentation - one should use each distributions'
packaging routines for this job.  If you want to install docs via a
Makefile use 'make install-docs'.


SYSTEM-SPECIFIC INFORMATION

Debian:

1) Add new lines to Debian/changelog and set the correct version number
in this file.

2) Check the following files:

	rules, menu, docs, *.manpages

3) Since gnokii's debian directory is in the subdirectory 'packaging'
which is totally non-standard for the Debian package building system,
you must first 'cd' to the top gnokii directory and type:

	ln -s packaging/Debian debian

4) In the top gnokii directory type:

	fakeroot debian/rules binary

5) And then clean up:

	fakeroot debian/rules clean

	rm debian

The .deb packages will appear in the directory ABOVE the top gnokii
directory.

Alternatively, if you want to build everything including sources (.tar.gz,
.dsc, and .changes files), go to the top gnokii directory and type:

	dpkg-buildpackage -rfakeroot

instead of invoking "debian/rules binary" directly.  Note that you will
need the fakeroot package installed, but are there any Debian developers
that don't have that one installed?  Nope.  If you want to sign the
packages with your own PGP key, you will need to make a new first entry
in the Debian changelog.


RedHat:

Just type:

	rpm -ta gnokii-$VERSION.tar.gz

where $VERSION is the version of the gnokii distribution that you are
packaging.


Slackware:

1) Create a gnokii directory and put the gnokii tarball there:

	mkdir gnokii

	cp gnokii-X.Y.Z.tar.gz gnokii

2) Extract SlackBuild from the tarball and copy it into the gnokii
directory, eg.:

	tar xzf gnokii-X.Y.Z.tar.gz

	cp gnokii-X.Y.Z/packaging/Slackware/SlackBuild gnokii

3) Run SlackBuild:

	cd gnokii

	chmod 755 ./SlackBuild ; ./SlackBuild

4) A Slackware package is now located in /tmp/gnokii.tgz.


FreeBSD:


Win32:


DOCUMENT HISTORY

2001-06-18

Erik Rossen <rossen@freesurf.ch>

* fixing Debian notes to mention 'fakeroot' and 'dpkg-buildpackage'

2001-04-20

Erik Rossen <rossen@freesurf.ch>

* fixing English grammar and spelling errors, but no change of information

* changing to a flatter format for easier editing: sections separated
by double spacing and only system commands indented with a tab

* file is always treated with GNU 'fmt' with no options

Pawel Kot <pkot@linuxnews.pl>

* Slackware build instructions added
