chiark / gitweb /
Debianization.
[checkpath-python] / debian / rules
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..4eda6a0
--- /dev/null
@@ -0,0 +1,63 @@
+#! /usr/bin/make -f
+
+export DH_COMPAT = 4
+
+DEFVERSION = 2.3
+VERSIONS = $(DEFVERSION) 2.4
+
+build: build-stamp
+
+build-stamp:
+       for v in $(VERSIONS); do python$$v setup.py build; done
+       touch build-stamp
+
+clean:
+       dh_clean
+       make clean
+       rm -rf build build-stamp
+
+install: build
+       dh_clean
+       for v in $(VERSIONS); do \
+         python$$v setup.py build; \
+         python$$v setup.py install --root=debian/python$$v-checkpath; \
+       done
+       mkdir -p debian/python-checkpath
+
+binary-indep: install
+       dh_testdir -i
+       dh_testroot -i
+       dh_compress -i
+       dh_installdocs -i
+       dh_python -i
+       dh_gencontrol -i
+       dh_fixperms -i
+       dh_installdeb -i
+       dh_md5sums -i
+       dh_builddeb -i
+
+binary-arch: install
+       dh_testdir -a
+       dh_testroot -a
+       dh_compress -a
+       dh_installdocs -a
+       dh_strip -a
+       dh_shlibdeps -a
+       dh_python -a
+       dh_gencontrol -a
+       dh_fixperms -a
+       dh_installdeb -a
+       dh_md5sums -a
+       dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+source:
+       rm -rf dist/*.tar.gz dist/=deb=
+       python setup.py sdist
+       mkdir dist/=deb=
+       cd dist/=deb=; tar xvfz ../*.tar.gz
+       d=`pwd`; cd ..; dpkg-source -i -i'/\.svn/' -b $$d/dist/=deb=/*
+       rm -rf dist/=deb=
+
+.PHONY: binary binary-arch binary-indep clean install source build