paul@68 | 1 | #!/usr/bin/make -f |
paul@68 | 2 | # A debian/rules file using python-central. |
paul@68 | 3 | |
paul@68 | 4 | # Uncomment this to turn on verbose mode. |
paul@68 | 5 | #export DH_VERBOSE=1 |
paul@68 | 6 | |
paul@68 | 7 | export DH_COMPAT=5 |
paul@68 | 8 | |
paul@68 | 9 | PYVERS=$(shell pyversions -vr) |
paul@68 | 10 | |
paul@68 | 11 | build: build-stamp |
paul@68 | 12 | |
paul@68 | 13 | build-stamp: $(PYVERS:%=build-python%) build-python-scripts |
paul@68 | 14 | touch $@ |
paul@68 | 15 | |
paul@68 | 16 | build-python%: |
paul@68 | 17 | python$* setup.py build_py |
paul@68 | 18 | touch $@ |
paul@68 | 19 | |
paul@68 | 20 | build-python-scripts: |
paul@68 | 21 | #python setup.py build_scripts |
paul@68 | 22 | #touch $@ |
paul@68 | 23 | |
paul@68 | 24 | clean: |
paul@68 | 25 | dh_testdir |
paul@68 | 26 | dh_testroot |
paul@68 | 27 | rm -f *-stamp |
paul@68 | 28 | rm -rf build |
paul@68 | 29 | find . -name '*.py[co]' | xargs rm -f |
paul@68 | 30 | dh_clean |
paul@68 | 31 | |
paul@68 | 32 | install: build install-prereq $(PYVERS:%=install-python%) install-python-scripts |
paul@68 | 33 | # Script fixing would appear here. |
paul@68 | 34 | |
paul@68 | 35 | install-prereq: |
paul@68 | 36 | dh_testdir |
paul@68 | 37 | dh_testroot |
paul@68 | 38 | dh_clean -k |
paul@68 | 39 | |
paul@68 | 40 | install-python%: |
paul@68 | 41 | python$* setup.py install_lib --install-dir $(CURDIR)/debian/python-desktop/usr/lib/python$*/site-packages |
paul@68 | 42 | |
paul@68 | 43 | install-python-scripts: |
paul@68 | 44 | #python setup.py install_scripts --install-dir $(CURDIR)/debian/python-desktop/usr/bin |
paul@68 | 45 | |
paul@68 | 46 | # Build architecture-independent files here. |
paul@68 | 47 | |
paul@68 | 48 | binary-indep: install |
paul@68 | 49 | tools/apidocs.sh |
paul@68 | 50 | dh_testdir -i |
paul@68 | 51 | dh_testroot -i |
paul@68 | 52 | dh_pycentral -i |
paul@68 | 53 | dh_installdocs -i |
paul@68 | 54 | dh_fixperms -i |
paul@68 | 55 | dh_installdeb -i |
paul@68 | 56 | dh_gencontrol -i |
paul@68 | 57 | dh_md5sums -i |
paul@68 | 58 | dh_builddeb -i |
paul@68 | 59 | |
paul@68 | 60 | # Build architecture-dependent files here. |
paul@68 | 61 | |
paul@68 | 62 | binary-arch: |
paul@68 | 63 | # Empty rule for this package. |
paul@68 | 64 | |
paul@68 | 65 | binary: binary-indep binary-arch |
paul@68 | 66 | .PHONY: build clean binary-arch binary-indep binary install |