Re: [Hampshire] Debian packaging: is there a complete set of…

Top Page

Reply to this message
Author: Adrian Bridgett
Date:  
To: lug, Hampshire LUG Discussion List
CC: 
Subject: Re: [Hampshire] Debian packaging: is there a complete set of instructions anywhere?
On Tue, Jan 22, 2008 at 15:25:32 -0000 (-0000), Vic wrote:
> Hi All.
>
> I'm trying to build some .deb packages, and I've run into a few snags. If
> anyone can point me at a complete set of rules (i.e. not
> http://www.debian.org/doc/manuals/maint-guide/index.en.html , because
> that's missing the "fine print"), I'd be grateful...


Just having a quick google to find helpful guides:
http://liw.iki.fi/liw/talks/debian-packaging-tutorial.pdf

is pretty good - nice overview with an explanation of some underlying
stuff to avoid "black box syndrome".

> Now this is exactly the same as my original tarball - size and md5sum
> match. But trying to change bar-<version>.dsc to mention the original
> tarball doesn't seem to be allowed; is there a way to do this (I want this
> to be traceable...)?


Most debian source packages consist of:
...orig.tar.gz (pristine (i.e. unchanged _at all_) upstream tarball
...diff.gz (changes)

If a package is _only_ in debian, then you just have a "...tar.gz" (no
.orig.tar.gz, no .diff.gz).

> Next up, I seem to have misunderstood the $(DESTDIR) bit of the
> maintainer;s guide; if I want a package to install a file to /lib32/ (as
> its Makefile does), where do I put that in the source package? My build
> installs the file correctly, but the package it creates doesn't :-(


Basically the files should be installed under
bar-version/debian/tmp
or
bar-version/debian/package

So, if you have "bar" (source package) creating two package
"bar-utils" and "libbar1", then you might end up with:

bar-version/debian/libbar1/usr/share/doc/libbar1/...
bar-version/debian/libbar1/usr/lib/...
bar-version/debian/bar-utils/usr/share/doc/bar-utils/...
bar-version/debian/bar-utils/usr/bin/bar

I'm sure you are familiar with $prefix (as part of ./configure) -
which you would often set to "/usr". Well, if you are lucky, setting
DESTDIR=`pwd`/debian/libbar1 (or bar-utils) would combine with this to
install into `pwd`/debian/libbar1/usr/.... as you want.

Feel free to ping me online in the evening if you want help (drop me
an email for skype/MSN/IRC details).

Adrian
--
Email: adrian@??? -*- GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution -*- www.debian.org