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