[Python-modules-commits] r8002 - in packages/pyparted/trunk/debian (control rules)

dktrkranz-guest at users.alioth.debian.org dktrkranz-guest at users.alioth.debian.org
Thu Mar 26 10:03:33 UTC 2009


    Date: Thursday, March 26, 2009 @ 10:03:33
  Author: dktrkranz-guest
Revision: 8002

Build extension for all supported Python versions

Modified:
  packages/pyparted/trunk/debian/control
  packages/pyparted/trunk/debian/rules

Modified: packages/pyparted/trunk/debian/control
===================================================================
--- packages/pyparted/trunk/debian/control	2009-03-25 19:53:57 UTC (rev 8001)
+++ packages/pyparted/trunk/debian/control	2009-03-26 10:03:33 UTC (rev 8002)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Luca Falavigna <dktrkranz at ubuntu.com>
-Build-Depends: debhelper (>= 6), python-all-dev, python-support (>= 0.5.3), pkg-config, libparted1.8-dev (>= 1.8.6), automake, libdevmapper-dev, uuid-dev, quilt
+Build-Depends: debhelper (>= 6), python-all-dev, python-all-dbg, python-support (>= 0.5.3), pkg-config, libparted1.8-dev (>= 1.8.6), automake, libdevmapper-dev, uuid-dev, quilt
 Standards-Version: 3.8.1
 Homepage: http://fedorahosted.org/pyparted/
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/pyparted/trunk/

Modified: packages/pyparted/trunk/debian/rules
===================================================================
--- packages/pyparted/trunk/debian/rules	2009-03-25 19:53:57 UTC (rev 8001)
+++ packages/pyparted/trunk/debian/rules	2009-03-26 10:03:33 UTC (rev 8002)
@@ -2,22 +2,43 @@
 
 include /usr/share/quilt/quilt.make
 
+PYTHONS := $(shell pyversions -vr debian/control)
+
 configure: configure-stamp
 configure-stamp:
 	dh_testdir
-	./configure --prefix=/usr
+	for pyvers in ${PYTHONS}; do \
+		mkdir -p build/py$$pyvers; \
+		cp -Rl `ls . | grep -v build | grep -v debian` build/py$$pyvers;\
+		(cd build/py$$pyvers; \
+		./configure --prefix=/usr PYTHON=python$$pyvers); \
+	done
+	for pyvers in ${PYTHONS}; do \
+		mkdir -p build/py$$pyvers-dbg; \
+		cp -Rl `ls . | grep -v build | grep -v debian` build/py$$pyvers-dbg; \
+		(cd build/py$$pyvers-dbg; \
+		./configure PYTHON=python$${pyvers} CFLAGS="-g -ggdb `python$${pyvers}-dbg-config --include` " --prefix=/usr ; \
+		sed -i Makefile -e 's/\(^PYTHON_INCLUDES\s=.*\)/\1_d/' ) ; \
+	done
 	touch configure-stamp
 
 build: patch build-stamp
 build-stamp: configure-stamp  
 	dh_testdir
-	$(MAKE)
+	for pyvers in ${PYTHONS}; do \
+		(cd build/py$$pyvers/; $(MAKE) PYTHON=python$$pyvers); \
+	done
+	for pyvers in ${PYTHONS}; do \
+		(cd build/py$$pyvers-dbg/; \
+		$(MAKE) PYTHON=python$${pyvers}-dbg); \
+	done
 	touch $@
 
 clean: unpatch
 	dh_testdir
 	dh_testroot
 	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -fr build
 	dh_clean build-stamp configure-stamp
 
 install: build
@@ -25,7 +46,14 @@
 	dh_testroot
 	dh_clean -k  
 	dh_installdirs
-	$(MAKE) DESTDIR=$(CURDIR)/debian/python-parted install
+	for pyvers in ${PYTHONS}; do \
+		(cd build/py$$pyvers/; $(MAKE) install DESTDIR=$(CURDIR)/debian/python-parted); \
+	done
+	for pyvers in ${PYTHONS}; do \
+		(cd build/py$${pyvers}-dbg/; \
+		$(MAKE) install DESTDIR=$(CURDIR)/debian/python-parted-dbg); \
+		(cd $(CURDIR)/debian/python-parted-dbg/usr/lib/python$${pyvers}/*-packages; mv _pedmodule.so _pedmodule_d.so); \
+	done
 
 binary-indep: install
 
@@ -35,7 +63,8 @@
 	dh_installchangelogs
 	dh_installdocs
 	dh_pysupport
-	dh_strip --dbg-package=python-parted-dbg
+	dh_strip --dbg-package=python-parted-dbg -X_pedmodule_d.so
+	rm -fr $(CURDIR)/debian/python-parted-dbg/usr/share/python-support/
 	dh_compress
 	dh_fixperms
 	dh_installdeb




More information about the Python-modules-commits mailing list