[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/1.1.0-2

Guido Günther agx at sigxcpu.org
Tue Jul 9 14:15:04 UTC 2013


The following commit has been merged in the master branch:
commit 54deab3f6a34d883a53d28816429c323c40ed20a
Author: Guido Günther <agx at sigxcpu.org>
Date:   Sat Jul 6 13:42:05 2013 +0200

    Switch to dh

diff --git a/debian/compat b/debian/compat
index 7f8f011..45a4fb7 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+8
diff --git a/debian/control b/debian/control
index 2f5ed38..b98793c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: libs
 Priority: optional
 Maintainer: Debian Libvirt Maintainers <pkg-libvirt-maintainers at lists.alioth.debian.org>
 Uploaders: Guido Günther <agx at sigxcpu.org>, Laurent Léonard <laurent at open-minds.org>
-Build-Depends: cdbs (>= 0.4.90~),
+Build-Depends:
  debhelper (>= 7),
  dh-systemd (>= 1.3),
  libxml2-dev,
diff --git a/debian/python.mk b/debian/python.mk
index bcec1f7..cbe79ee 100644
--- a/debian/python.mk
+++ b/debian/python.mk
@@ -24,15 +24,15 @@ otherpy = \
 	done; \
 	ln -sf $(PY_DIR)$(PYDEFAULTVER) $(PY_DIR)
 
-configure/python-libvirt::
+configure::
 	set -e; for v in $(PYVERSIONS); do \
 		cp -la $(PY_DIR) $(PY_DIR)$$v; \
 	done
 	$(RM) -r $(PY_DIR)
 	ln -sf $(PY_DIR)$(PYDEFAULTVER) $(PY_DIR)
 
-build/python-libvirt::
+build::
 	$(call otherpy, all)
 
-install/python-libvirt::
+install::
 	$(call otherpy, install DESTDIR=$(CURDIR)/debian/tmp)
diff --git a/debian/rules b/debian/rules
index f83fbc1..158125d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,12 +1,7 @@
 #!/usr/bin/make -f
 
-DEB_BUILD_PARALLEL = yes
 export VIR_TEST_DEBUG=1
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/autotools.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
-
 ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
   ifneq (,$(findstring $(DEB_HOST_ARCH), i386 amd64))
     DEB_MAKE_CHECK_TARGET = check
@@ -67,8 +62,7 @@ else
   WITH_VBOX           = --without-vbox
 endif
 
-DEB_BUILDDIR := $(CURDIR)/debian/build
-DEB_CONFIGURE_EXTRA_FLAGS :=     \
+DEB_CONFIGURE_EXTRA_ARGS :=      \
 	--disable-rpath          \
 	$(WITH_QEMU)		 \
 	--with-qemu-user=libvirt-qemu  \
@@ -100,28 +94,30 @@ DEB_CONFIGURE_EXTRA_FLAGS :=     \
 	$(WITH_AUDIT)            \
 	--without-firewalld
 
-DEB_COMPRESS_EXCLUDE = .o event-test hellolibvirt info1 suspend
-DEB_PYTHON_SETUP_CMD = /dev/null
-DEB_DH_MAKESHLIBS_ARGS_libvirt0 += -V 'libvirt0 (>= 0.5.0)'
-DEB_DH_INSTALLINIT_ARGS = --no-restart-on-upgrade -- defaults 28 72
-DEB_PYTHON_MODULE_PACKAGE = python-libvirt
-
+DEB_BUILDDIR := $(CURDIR)/debian/build
 LOGROTATE = $(basename $(basename $(notdir $(wildcard daemon/libvirtd*.logrotate.in))))
 EXAMPLES_DIR = $(CURDIR)/debian/libvirt-doc/usr/share/doc/libvirt-doc/examples/
 
-include debian/python.mk
+%:
+	dh $@ --builddirectory=$(DEB_BUILDDIR)
 
-binary-install/libvirt-bin::
+override_dh_auto_configure:
+	dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_ARGS)
+	DEB_BUILDDIR=$(DEB_BUILDDIR) make -f debian/python.mk configure
+
+override_dh_auto_install:
+	dh_auto_install
+	DEB_BUILDDIR=$(DEB_BUILDDIR) make -f debian/python.mk install
+
+override_dh_install:
+	dh_install
+	# Copy upstream files to debian/ so dh_* can find them
 	cp debian/tmp/usr/lib/libvirt/libvirt-guests.sh \
 	    debian/libvirt-bin.libvirt-guests.init
 	cp tools/libvirt-guests.sysconf \
 	    debian/libvirt-bin.libvirt-guests.default
 	-mv debian/libvirt-bin/lib/systemd/system/libvirtd.service \
 	    debian/libvirt-bin/lib/systemd/system/libvirt-bin.service
-	dh_systemd_enable
-	dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
-	dh_systemd_start --restart-after-upgrade
-	rm debian/libvirt-bin/usr/lib/libvirt/connection-driver/*.la
 
 	for l in $(LOGROTATE); do \
 		cp $(CURDIR)/debian/build/daemon/$$l.logrotate \
@@ -129,22 +125,38 @@ binary-install/libvirt-bin::
 		dh_installlogrotate --name=$$l;     \
 	done
 
-build/libvirt-bin::
-	# Add empty dirs so dh_install doesn't fail on kFreebsd until we have
-	# Polkit/Systemd support
-	mkdir -p debian/tmp/usr/share/polkit-1 \
-	         debian/tmp/lib/systemd/system \
-	         debian/tmp/usr/share/systemtap
+	# Don't ship any la files
+	rm debian/libvirt-bin/usr/lib/libvirt/connection-driver/*.la
 
+override_dh_installinit:
+	dh_systemd_enable
+	dh_installinit --name=libvirt-bin --no-restart-on-upgrade -- defaults 28 72
+	dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
+	dh_systemd_start --restart-after-upgrade
 
-binary-install/libvirt-doc::
+override_dh_installdocs:
+	dh_installdocs
+	# Remove binaries and object files examples
 	find $(EXAMPLES_DIR) -name "*.o" -type f -delete -o -name .libs -type d -exec rm -rf {} \;
 	rm -f $(EXAMPLES_DIR)domain-events/events-c/event-test
 	rm -f $(EXAMPLES_DIR)dominfo/info1
 	rm -f $(EXAMPLES_DIR)domsuspend/suspend
 	rm -f $(EXAMPLES_DIR)hellolibvirt/hellolibvirt
 
-clean::
+override_dh_strip:
+	dh_strip --dbg-package=libvirt0-dbg
+
+override_dh_auto_build:
+	dh_auto_build -a -i
+	DEB_BUILDDIR=$(DEB_BUILDDIR) make -f debian/python.mk build
+	# Add empty dirs so dh_install doesn't fail on kFreebsd until we have
+	# Polkit/Systemd support
+	mkdir -p debian/tmp/usr/share/polkit-1 \
+	         debian/tmp/lib/systemd/system \
+	         debian/tmp/usr/share/systemtap
+
+override_dh_auto_clean:
+	[ ! -f Makefile ] || dh_auto_clean
 	rm -f $(CURDIR)/debian/libvirt-bin.libvirt-guests.init
 	rm -f $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
 	rm -f $(CURDIR)/debian/libvirt-bin.*.logrotate

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list