Re: How to tell cdbs to work only on 2 out of 7 debs in debian/control?
Here, by defaults, it builds 7 debs: A_i386.deb through G_i386.deb.
I only want 1st and 6th debs: A_i386.deb and F_i386.deb. I have tried setting
DEB_ALL_PACKAGES and its arch sisters to "A F". For some reason,
it still does not ignore the other 5, and fail. The failure is due to
make: *** No rule to make target `binary-post-install/B', needed by
`common-binary-post-install-arch'. Stop.
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
/usr/share/cdbs/1/rules/debhelper.mk has
common-binary-post-install-arch:: $(patsubst
%,binary-post-install/%,$(DEB_ARCH_PACKAGES))
But I have set DEB_ARCH_PACKAGES to not include B.
I can also see that all 7 directories debian/A ... debian/G get created. I
think they
shouldn't. I expected only debian/A and debian/F directories.
Is this likely a bug?
----- Original Message ----
From: Niels Thykier <niels@thykier.net>
To: Regid Ichira <regid23@yahoo.com>; debian-mentors@lists.debian.org
Sent: Mon, May 23, 2011 10:22:58 AM
Subject: Re: How to tell cdbs to work only on 2 out of 7 debs in debian/control?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 2011-05-23 04:15, Regid Ichira wrote:
> debian/control of the nut source package has about 7 binary debs,
>
> say A ... G. They are built using cdbs. What should I put in debian/rules in
> order to build only A and B?
> The rules file that the debian maintainer uses for building all the debs is:
>
> $ cat debian/rules
> #!/usr/bin/make -f
>
> include /usr/share/cdbs/1/rules/debhelper.mk
> include /usr/share/cdbs/1/class/autotools.mk
>
> DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
>
>
> DEB_CONFIGURE_EXTRA_FLAGS := --prefix=/usr \
> --exec-prefix=/ \
> --sysconfdir=/etc/nut \
> --mandir=/usr/share/man \
> --libdir=/lib \
> --includedir=/usr/include \
> --without-ssl \
> --with-hal \
> --with-cgi \
> --with-dev \
> --enable-static \
> --with-statepath=/var/run/nut \
> --with-altpidpath=/var/run/nut \
> --with-drvpath=/lib/nut \
> --with-cgipath=/usr/lib/cgi-bin/nut \
> --with-htmlpath=/usr/share/nut/www \
> --with-pidpath=/var/run/nut \
> --datadir=/usr/share/nut \
> --with-pkgconfig-dir=/usr/lib/pkgconfig \
> --with-user=nut --with-group=nut
>
> ifeq (linux,$(DEB_HOST_ARCH_OS))
> DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev
> endif
>
> common-install-arch::
> # install the bash completion script
> mkdir -p $(CURDIR)/debian/tmp/etc/bash_completion.d
> cp $(CURDIR)/scripts/misc/nut.bash_completion \
> $(CURDIR)/debian/tmp/etc/bash_completion.d/nut
>
> # install the default configuration
> for f in $(CURDIR)/debian/tmp/etc/nut/*; do \
> nf=`basename $${f} | sed 's/\(.*\).sample/\1/'`; \
> mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \
> done
>
> DEB_DH_INSTALLINIT_ARGS_nut := -- start 50 2 3 4 5 . stop 50 0 1 6 .
>
> ifeq (linux,$(DEB_HOST_ARCH_OS))
> # for Debian
> DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 0.124-1)"
> # for Ubuntu
> # DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 136-1)"
> endif
>
>
Generally it will build all packages that should be built (e.g. all arch
packages or all binaries with dpkg-buildpackage -B and -b respectively).
I am not sure cdbs has some way to alter this, but if you looking for a
way to only do something for a certain binary package, then you can use
its hook targets.
I cannot remember all of them, but as I recall they are:
install/<pkg>::
binary-install/<pkg>::
binary-fixup/<pkg>::
binary/<pkg>::
Have a look at /usr/share/cdbs/1/rules/debhelper.mk and look for things
like:
$(patsubst %,binary-install/%,$(DEB_ALL_PACKAGES)) :: binary-install/%:
It might be possible to modify the definition of "DEB_ALL_PACKAGES" and
its sister variables, but if dpkg-buildpackage -B and architecture
settings cannot satisfy your needs, it might be worth reconsidering the
approach.
~Niels
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBCAAGBQJN2gs+AAoJEAVLu599gGRCTBUP/1sDsWNcvD5kOx/DlPZ3VHOJ
9FahX861OlL2GlpdO1hI38nqi8J72VTvUt3yIOyRzYZWECD6LNwDTEvOjxuyu/xx
NDJwurLkltm/vvJTszpYuTIU729PVilSJrEi5l+eXfbZP8isyORA9WEN8AH1ay3o
BesJYRfyEI8UyFt7dUvcCXzbB99NneQWTBt0OAJe4V8cT2a1padik8Os0TfGlfYr
y+X9nuZjHAlAK77AQY4gHc7ECCCCphYNDMSmM/zAg/+dHv75///kRjgiOXaLEmyq
+I2ArGUsZ7sVLYuL0/Hn+j60CpjyADWzi9fksr1MK26RYIUa4ZEF10eHlJwVqum4
+eHZkt7ycreb39L/WDu/FrAmsnSxb8z8je3fhCV400y9nMGnuROgwHTbhCJ+uxEi
uJfo6MVib6HeALAik7+BA+8d8QtaiddFVA4qVBCjgk8QF31PcAQv7FBw68svAoRb
S9Hi1VcG/fq6+KlpyKozmSNla5NzUqz5kN3z//R1JLLfkBPIw4l+vaWOQj9DlKtH
1kSEPzUHGMmUzDrJ4zcWNeY52RsNz+mZV1NTSYY3AxZ+i9K6Zz49XmDNGIX9YSAE
4oYtaaVS8v1vFwMFIPE/Wj8dTqD3Fyknfk2tzj/RbsWf/pdoNZgvo8A6ICpZAKqg
1QP6sNAl6Nne3I09L6hD
=kFsi
-----END PGP SIGNATURE-----
Reply to: