Re: [HELP][LONG] Multiple-binaries packages
On 4/26/07, David Paleino <firstname.lastname@example.org> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
I'm trying to package integcheck before ITPing it (see RFP #230769). Since I'm
just starting with packaging stuff, I encountrered some problems with this one
(never created multiple-binaries packages before).
I should create two packages: integcheck-server and -client. For that, I created
two Package sections in debian/control, and created the various
Now, let's go to debian/rules. What should I edit here? I've seen *-indep and
*-arch targets, but they are supposed to be used with different archs, aren't
they? My package runs on any arch, so are they of any use?
*-indep is for Architecture: all binary packages; *-arch is for
anything else. If you only have one or the other (that is,
everything's arch:all, or nothing's arch:all), then you can leave the
other blank, or even (I think) just remove -arch or -indep and use eg
binary:. Since your install script seems to be installing just perl
and shell scripts, this shouldn't be a problem.
Do consider whether your package really /needs/ it though.
Secondly, the Makefile is totally useless in this case. Here is it:
dpkg-buildpackage -us -uc -rfakeroot
install -m 755 -o root -g root bin/integcheck-shell.pl
install -m 755 -o root -g root bin/integcheck-compare.pl
install -m 755 -o root -g root bin/integcheck-run.sh
install -m 644 -o root -g root etc/integcheck.cron $(etc)/cron.d/integcheck
The upstream author provides a debian/ directory (building from it causes
lintian complain about *tons* of things), and the Makefile contains a "package"
target which used dpkg-buildpackage. That's not what we want to use for official
packages, don't we?
Now, I tried to use dh_install into the install-arch target of debian/rules, but
the manpage says it can't rename files. Ok. So I use /usr/bin/install, and
debuild complains about the inability to find ./bin/integcheck-*.
Splitting the installed files into multiple packages actually is a job
for dh_install. Try something like (this is based on the dh_make
$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
rm -rf $(CURDIR)/debian/tmp/usr/etc # use dh_installcron for
the crontab, not make install
dh_install --fail-missing --sourcedir=debian/tmp
Now put in debian/<binary package name>.install a series of wildcard
patterns for what to include, for example:
For a more complete template debian/rules and etc, delete the debian/
directory and run dh_make.