[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, master, updated. debian/1.12.4-2
Hilko Bengen
bengen at debian.org
Sun Aug 21 11:55:36 UTC 2011
The following commit has been merged in the master branch:
commit f5fac3a8c23cdbeb6f8ac0254c00e92bea4d889b
Author: Hilko Bengen <bengen at hilluzination.de>
Date: Sun Aug 14 23:44:01 2011 +0200
Use separate build directory, build multiple versions of the Python bindings
diff --git a/debian/control b/debian/control
index 697d038..5686fee 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Build-Depends: debhelper (>= 7.0.50~), autotools-dev, aptitude,
qemu-kvm (>= 0.13),
genisoimage, pkg-config,
dh-ocaml, ocaml, ocaml-findlib, libpcre-ocaml-dev,
- python (>= 2.6.7-2), python-all-dev (>= 2.6.6-3~),
+ python (>= 2.6.7-2), python-all-dev (>= 2.6.6-3~), python3-all-dev,
libtest-pod-coverage-perl, libextutils-command-perl, libintl-perl, libtest-pod-perl,
libstring-shellquote-perl,
libsys-virt-perl, libwin-hivex-perl,
diff --git a/debian/libguestfs0.install b/debian/libguestfs0.install
index 0c09699..4b6f190 100644
--- a/debian/libguestfs0.install
+++ b/debian/libguestfs0.install
@@ -4,11 +4,4 @@ usr/share/man/man1/libguestfs-test-tool*
usr/share/man/man3/guestfs.3*
usr/share/man/man3/libguestfs.3*
-# We do not install supermin.d/base.img, but ship make.sh which can be
-# used to build it.
-appliance/make.sh usr/lib/guestfs
-appliance/packagelist usr/lib/guestfs
-appliance/excludelist usr/lib/guestfs
-appliance/supermin.d/init.img usr/lib/guestfs/supermin.d
-appliance/supermin.d/daemon.img usr/lib/guestfs/supermin.d
debian/update-guestfs-appliance usr/sbin
diff --git a/debian/rules b/debian/rules
index 1986ffd..9ae5321 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,44 +1,96 @@
#!/usr/bin/make -f
+# export DH_VERBOSE=1
+
+PYTHONS := $(shell pyversions --installed; py3versions --installed)
+PYTHON_DEFAULT := $(shell pyversions --default)
+
+CONFIG_FLAGS = \
+ --enable-install-daemon \
+ --disable-appliance \
+ --with-readline \
+ --with-java-home=no \
+ --disable-ruby \
+ --disable-haskell \
+ --disable-php
+
override_dh_auto_clean:
- test -f Makefile && $(MAKE) distclean || true
+ set -e; for p in $(PYTHONS); do \
+ dh_auto_clean --builddir=$(CURDIR)/debian/build-$$p ; \
+ done
override_dh_auto_configure:
- dh_auto_configure -- \
- --enable-install-daemon \
- --disable-appliance \
- --with-readline \
- --with-java-home=no \
- --disable-ruby \
- --disable-haskell \
- --disable-php
+ set -e; for p in $(PYTHONS); do \
+ if [ $$p = $(PYTHON_DEFAULT) ]; then \
+ dh_auto_configure --builddir=$(CURDIR)/debian/build-$$p \
+ -- \
+ $(CONFIG_FLAGS); \
+ else \
+ dh_auto_configure --builddir=$(CURDIR)/debian/build-$$p \
+ -- \
+ --disable-daemon --disable-appliance --disable-fuse \
+ --with-java-home=no --disable-ocaml --disable-perl \
+ --disable-haskell --disable-ruby --disable-php \
+ PYTHON=$$p ; \
+ fi ; \
+ done
override_dh_strip:
dh_strip --dbg-package=libguestfs0-dbg
override_dh_auto_build:
- $(MAKE) INSTALLDIRS=vendor LD_RUN_PATH=""
-# build part of appliance
- $(MAKE) -C appliance \
- make.sh \
- packagelist excludelist \
- supermin.d/daemon.img supermin.d/init.img
+# also build part of appliance
+ set -e; for p in $(PYTHONS); do \
+ if [ $$p = $(PYTHON_DEFAULT) ]; then \
+ dh_auto_build --builddir=$(CURDIR)/debian/build-$$p \
+ -- \
+ INSTALLDIRS=vendor LD_RUN_PATH="" ; \
+ $(MAKE) -C $(CURDIR)/debian/build-$$p/appliance \
+ make.sh \
+ packagelist excludelist \
+ supermin.d/daemon.img supermin.d/init.img ; \
+ else \
+ dh_auto_build --builddir=$(CURDIR)/debian/build-$$p ; \
+ fi ; \
+ done
+
+override_dh_auto_test:
+ set -e $(MAKE) -C $(CURDIR)/debian/build-$(PYTHON_DEFAULT) check
+
+override_dh_auto_install:
+ set -e; for p in $(PYTHONS); do \
+ if [ $$p = $(PYTHON_DEFAULT) ]; then \
+ dh_auto_install --builddir=$(CURDIR)/debian/build-$$p ; \
+ else \
+ $(MAKE) -C $(CURDIR)/debian/build-$$p/python install \
+ DESTDIR=$(CURDIR)/debian/tmp ; \
+ fi ; \
+ done
override_dh_install:
- rm debian/tmp/usr/lib/python2.6/dist-packages/libguestfsmod.la
+ rm -f debian/tmp/usr/lib/python*/dist-packages/libguestfsmod.la
# Workaround for:
# W: libguestfs-perl: script-not-executable usr/lib/perl5/Sys/bindtests.pl
- rm debian/tmp/usr/lib/perl5/Sys/bindtests.pl
+ rm -f debian/tmp/usr/lib/perl5/Sys/bindtests.pl
# Workaround for:
# E: libguestfs-dev: non-empty-dependency_libs-in-la-file usr/lib/libguestfs.la
find debian/tmp -name *.la | xargs sed -i '/^dependency_libs/ s/^/# /'
- dh_install
+# We do not install supermin.d/base.img, but ship make.sh which can be
+# used to build it.
+ mkdir -p debian/tmp/usr/lib/guestfs/supermin.d
+ install -m755 debian/build-${PYTHON_DEFAULT}/appliance/make.sh \
+ debian/tmp/usr/lib/guestfs
+ install -m644 debian/build-${PYTHON_DEFAULT}/appliance/*list \
+ debian/tmp/usr/lib/guestfs
+ install -m644 \
+ debian/build-${PYTHON_DEFAULT}/appliance/supermin.d/init.img \
+ debian/build-${PYTHON_DEFAULT}/appliance/supermin.d/daemon.img \
+ debian/tmp/usr/lib/guestfs/supermin.d/
-override_dh_python2:
- dh_python2 --no-guessing-versions
+ dh_install
%:
- dh --without=python-support --with=autotools-dev,ocaml,python2 $@
+ dh --without=python-support --with=autotools-dev,ocaml,python2,python3 $@
--
Libguestfs Debian packaging
More information about the Pkg-libvirt-commits
mailing list