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 dh_pycentral -i 52 dh_installdocs -i 53 dh_installchangelogs -i 54 gzip --best debian/shedskin.1 55 dh_installman -i debian/shedskin.1.gz 56 dh_fixperms -i 57 dh_installdeb -i 58 dh_gencontrol -i 59 dh_md5sums -i 60 dh_builddeb -i 61 62 # Build architecture-dependent files here. 63 64 binary-arch: 65 # Empty rule for this package. 66 67 binary: binary-indep binary-arch 68 .PHONY: build clean binary-arch binary-indep binary install