| author | Philipp Hahn <hahn@univention.de> | |
| Tue, 23 Aug 2011 17:18:11 +0000 (19:18 +0200) | ||
| committer | Guido Günther <agx@sigxcpu.org> | |
| Tue, 23 Aug 2011 19:17:15 +0000 (21:17 +0200) |
Closes: #628828
| debian/control | patch | blob | history | |
| debian/python.mk | [new file with mode: 0644] | patch | blob |
| debian/rules | patch | blob | history |
diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
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],
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
--- /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
--- a/debian/rules
+++ b/debian/rules
CFLAGS = -fwrapv -DWRAPV
endif
-
+DEB_BUILDDIR := $(CURDIR)/debian/build
DEB_CONFIGURE_EXTRA_FLAGS := \
--disable-rpath \
$(WITH_QEMU) \
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
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)
