2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Modified to make a template file for a multi-binary package with separated
6 # build-arch and build-indep targets by Bill Allombert 2001
8 # Uncomment this to turn on verbose mode.
11 # This has to be exported to make some magic below work.
14 PYVERS := $(shell pyversions -vr)
16 PKGROOT=debian/python-pylibacl
17 DBGROOT=debian/python-pylibacl-dbg
19 build: $(PYVERS:%=build-python%) build-indep
23 python$* setup.py build
24 python$*-dbg setup.py build
34 rm -f build-arch-stamp build-indep #CONFIGURE-STAMP#
37 rm -f $(PYVERS:%=build-python%)
40 install: build $(PYVERS:%=install-python%)
41 find $(DBGROOT) ! -type d ! -name '*_d.so' | xargs rm -f
42 find $(DBGROOT) -depth -empty -print0|xargs -r0 rmdir
45 python$* setup.py install --root $(PKGROOT) --install-layout=deb
46 python$*-dbg setup.py install --root $(DBGROOT) --install-layout=deb
48 # Build architecture-dependent files here.
49 binary-arch: build install
54 dh_strip -ppython-pylibacl --dbg-package=python-pylibacl-dbg
55 rm -rf $(DBGROOT)/usr/share/doc/python-pylibacl-dbg
56 ln -s python-pylibacl $(DBGROOT)/usr/share/doc/python-pylibacl-dbg
66 # Build architecture independant packages here.
67 binary-indep: build install
70 binary: binary-arch binary-indep
71 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure