1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/debian/rules Mon Jan 11 01:41:58 2010 +0100
1.3 @@ -0,0 +1,67 @@
1.4 +#!/usr/bin/make -f
1.5 +
1.6 +# Uncomment this to turn on verbose mode.
1.7 +#export DH_VERBOSE=1
1.8 +
1.9 +PYVERS=$(shell pyversions -vr)
1.10 +
1.11 +build: build-stamp
1.12 +
1.13 +build-stamp: $(PYVERS:%=build-python%)
1.14 + touch $@
1.15 +
1.16 +build-python%:
1.17 + python$* setup.py build_py
1.18 + touch $@
1.19 +
1.20 +build-python-scripts:
1.21 + python setup.py build_scripts
1.22 + touch $@
1.23 +
1.24 +clean:
1.25 + dh_testdir
1.26 + dh_testroot
1.27 + rm -f *-stamp
1.28 + rm -rf build
1.29 + find . -name '*.py[co]' | xargs rm -f
1.30 + dh_clean
1.31 +
1.32 +install: build install-prereq $(PYVERS:%=install-python%) install-python-scripts
1.33 + # Script fixing would appear here.
1.34 +
1.35 +install-prereq:
1.36 + dh_testdir
1.37 + dh_testroot
1.38 + dh_clean -k
1.39 +
1.40 +install-python%:
1.41 + python$* setup.py install_lib --install-dir $(CURDIR)/debian/shedskin/usr/lib/python$*/site-packages
1.42 +
1.43 +install-python-scripts:
1.44 + python setup.py install_scripts --install-dir $(CURDIR)/debian/shedskin/usr/bin
1.45 +
1.46 +# Build architecture-independent files here.
1.47 +
1.48 +binary-indep: install
1.49 + dh_testdir -i
1.50 + dh_testroot -i
1.51 + # Install before dh_pycentral so that it can work out that there's Python involved
1.52 + dh_install -i -n
1.53 + dh_pycentral -i usr/lib/shedskin/bin
1.54 + dh_installdocs -i
1.55 + dh_installchangelogs -i
1.56 + gzip --best debian/shedskin.1
1.57 + dh_installman -i debian/shedskin.1.gz
1.58 + dh_fixperms -i
1.59 + dh_installdeb -i
1.60 + dh_gencontrol -i
1.61 + dh_md5sums -i
1.62 + dh_builddeb -i
1.63 +
1.64 +# Build architecture-dependent files here.
1.65 +
1.66 +binary-arch:
1.67 + # Empty rule for this package.
1.68 +
1.69 +binary: binary-indep binary-arch
1.70 +.PHONY: build clean binary-arch binary-indep binary install