Code

Build Python dbg modules into rrdtool-dbg.
[pkg-rrdtool.git] / debian / rules
index 9290ed3d0291193012eea65d1e8f20579e61b22c..209a1ff11bec20a89fc07c8b8e24462082a8a5da 100755 (executable)
@@ -12,11 +12,7 @@ include /usr/share/quilt/quilt.make
 RUBY_VERS := 1.8 1.9
 RUBY_DEFAULT_VERS := 1.8
 
-#Python versions to build for. The work-around-doko way.
-PY_VERS := $(shell set -e; \
-                   for py in `pysupport-parseversions debian/pyversions`; do \
-                       if [ -x /usr/bin/python$$py ]; then echo $$py; fi;    \
-                   done)
+PY_VERS := $(shell pyversions -vr)
 
 #tcl version we're building for
 TCL_VERS := $(shell dpkg -s tcl-dev | grep '^Depends' \
@@ -75,7 +71,7 @@ endif
 
 build: build-arch build-indep 
 
-build-arch: build-arch-stamp $(PY_VERS:%=build-python%)
+build-arch: build-arch-stamp $(PY_VERS:%=build-python%) $(PY_VERS:%=build-python%-dbg)
 build-arch-stamp: config.status 
        make
        #Fix library path to tcl bindings
@@ -90,7 +86,7 @@ build-arch-stamp: config.status
 build-python%: build-arch-stamp
        set -e ;\
         cd bindings/python ;\
-        BUILDLIBDIR=../../src/.libs LIBDIR=../../src/.libs python$* setup.py build
+        BUILDLIBDIR=../../src/.libs LIBDIR=../../src/.libs python$* setup.py build ;\
        touch $@
 
 build-indep: build-arch-stamp
@@ -167,7 +163,8 @@ install-python%: install-common-stamp
        dh_testroot
        set -e ;\
         cd bindings/python ;\
-        python$* setup.py install --root=$(CURDIR)/debian/python-rrdtool
+        python$* setup.py install --root=$(CURDIR)/debian/python-rrdtool ;\
+        python$*-dbg setup.py install --root=$(CURDIR)/debian/rrdtool-dbg
 
 
 binary-indep: build-indep install-indep