[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Building Debian Packages
Þann 20-Jan-98 skrifar George Bonser:
>
> In the course of our work, we will need to create .deb packages of our
> specific contributions as well as unpacking existing debian packages, make
> changes to various defaults and repack them.
>
> In light of this, I have asked a frequent correspondant on other mailing
> lists, Orn Hansen, to give us a basic rundown of creating a debian
> package. I did this because he has been a debian package maintainer and I
> wanted to avoid us all jumping into debian-devel while Debian-2.0 is still
> being put together. I could point you to the docs but it is sometimes
> nice to have someone that you can ask a question of when you hit a snag in
> the process.
>
> Orn has advised me that he has subscribed to seul-dev-distrib and I thik
> he is much better qualified that I in describing the package building
> process though I will become VERY much more familliar with the process in
> the coming days.
>
> Welcone, Orn.
>
Thanks George,
The process of creating a Debian package is quite simple. The process,
as I understand it, was developed for the purpose of allowing anyone to acquire
a package outside the debian distribution and debianize it with minimum of
effort.
I would recommend using the scripts provided by Debian 'debmake', which
greatly simplifies the project. With it, you take a package and put into a
directory with the style 'package-1.0', where {1.0} is the version number of
the package. Then you enter the directory and type 'deb-make'. What this
script does, is make a backup copy of the source tree, into a directory
called '../package-1.0.orig', and create a subdirectory 'debian', that holds
information for the debian control file, copyright notice, and mainly the
"rules" file, which holds a 'make' style rules to create the package. The
files here need to be edited, filling in the information in question, such as
the name of the maintainer (packager), where the packager got the package, the
developer(s) of the package, the copyright that applies to it, description of
it... the directories it needs for install (used when making a temporary build
directory).
Once this is done, and you have done the changes needed to the package, to
make it compile under a debian system (changes to C files, dependencies, etc),
you make sure that the 'install' part of the Makefile installs all files
relative to $(DESTDIR). Then you can enter the directory 'package-1.0' and
run the script 'dpkg-buildpackage', which automizes the process. It calls,
another script 'dpkg-source' to build a new source tree 'package-1.0.tar.gz'
and a diff file between the two source trees 'package-1.0' and
'package-1.0.orig.tar.gz' in 'package-1.0-{release}.diff.gz'. It then procedes
to compiling the package, and if that is successfull will install it, with
DESTDIR=debian/tmp, which will install all the files into that directory. It
will then create a tar ball of it, and then build an archive file of the data
and call it 'package-1.0-{release}_{arch}.deb'.
----------------------------------------------------------------------------
Orn Einar Hansen oe.hansen@oehansen.pp.se
oehansen@daimi.aau.dk
voice+fax; +46 035 217194