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