[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.9.4-2
Guido Günther
agx at sigxcpu.org
Tue Aug 23 20:04:14 UTC 2011
The following commit has been merged in the master branch:
commit c9a080d47c592f62a43dcb4adc01c623dc4c17f1
Author: Philipp Hahn <hahn at univention.de>
Date: Tue Aug 23 19:18:11 2011 +0200
Build python-libvirt for all python versions
Closes: #628828
diff --git a/debian/control b/debian/control
index a68e370..9385606 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends: cdbs (>= 0.4.90~),
libreadline-dev,
zlib1g-dev,
libgnutls-dev,
- python-dev (>= 2.6.6-3~),
+ python-all-dev (>= 2.6.6-3~),
libavahi-client-dev,
libsasl2-dev,
libxen-dev [i386 amd64],
@@ -35,14 +35,13 @@ Build-Depends: cdbs (>= 0.4.90~),
dnsmasq-base,
openssh-client,
netcat-openbsd,
-XS-Python-Version: current
Build-Conflicts: dpkg-dev (= 1.15.3)
Vcs-Git: git://git.debian.org/git/pkg-libvirt/libvirt.git
Vcs-Browser: http://git.debian.org/?p=pkg-libvirt/libvirt.git
Homepage: http://libvirt.org
Standards-Version: 3.9.2
DM-Upload-Allowed: yes
-X-Python-Version: 2.6
+X-Python-Version: current
Package: libvirt-bin
Architecture: any
diff --git a/debian/python.mk b/debian/python.mk
new file mode 100644
index 0000000..bcec1f7
--- /dev/null
+++ b/debian/python.mk
@@ -0,0 +1,38 @@
+# Build python modules for all known python versions
+
+include /usr/share/python/python.mk
+ifeq (,$(py_sitename))
+ py_libdir_sh = $$(_py_=$(strip $(1)); python$${_py_\#python*} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
+endif
+
+PY_DIR := $(DEB_BUILDDIR)/python
+PYDEFAULTVER := $(shell pyversions --version --default)
+PYVERSIONS := $(shell pyversions --version --installed)
+
+otherpy = \
+ set -e; for v in $(PYVERSIONS); do \
+ $(RM) $(PY_DIR); \
+ ln -sf $(PY_DIR)$$v $(PY_DIR); \
+ $(MAKE) \
+ -C $(PY_DIR) \
+ pyexecdir=$(call py_libdir_sh, $$v) \
+ PYTHON=python$$v \
+ PYTHON_VERSION=$$v \
+ PYTHON_INCLUDES=-I/usr/include/python$$v \
+ $1; \
+ $(RM) $(PY_DIR); \
+ done; \
+ ln -sf $(PY_DIR)$(PYDEFAULTVER) $(PY_DIR)
+
+configure/python-libvirt::
+ 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::
+ $(call otherpy, all)
+
+install/python-libvirt::
+ $(call otherpy, install DESTDIR=$(CURDIR)/debian/tmp)
diff --git a/debian/rules b/debian/rules
index e513591..b4fba08 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,7 +49,7 @@ ifneq (,$(findstring ${DEB_BUILD_ARCH}, m68k))
CFLAGS = -fwrapv -DWRAPV
endif
-
+DEB_BUILDDIR := $(CURDIR)/debian/build
DEB_CONFIGURE_EXTRA_FLAGS := \
--disable-rpath \
$(WITH_QEMU) \
@@ -83,10 +83,13 @@ 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
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
+
binary-install/libvirt-bin::
cp $(CURDIR)/tools/libvirt-guests.init.sh $(CURDIR)/debian/libvirt-bin.libvirt-guests.init
cp $(CURDIR)/tools/libvirt-guests.sysconf $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
@@ -114,3 +117,4 @@ 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
+ rm -rf $(DEB_BUILDDIR)
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list