summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..5a373a0
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,28 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+SUPP := $(shell ./parseversions --all --long)
+
+clean::
+ rm -f debhelper/dh_pysupport.1 *.pyc
+
+check:
+ dh_testdir
+ cd tests && PATH=$(CURDIR):$$PATH ./testparseversions.py
+
+maybe_check = $(if $(findstring nocheck,$(DEB_BUILD_OPTIONS)),,check)
+
+build/python-support::
+ cd debhelper && pod2man -c "python-support" -r "$(DEB_VERSION)" dh_pysupport dh_pysupport.1
+
+binary-install/python-support:: $(maybe_check)
+ for ver in $(SUPP); do \
+ subdir=dist-packages; \
+ if dpkg --compare-versions $$ver lt python2.6; then \
+ subdir=site-packages; \
+ fi; \
+ mkdir -p debian/python-support/usr/lib/$$ver/$$subdir; \
+ ln -s ../../pymodules/$$ver/.path debian/python-support/usr/lib/$$ver/$$subdir/python-support.pth; \
+ done
+