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