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#
36 rm -f $(PYVERS:%=build-python%)
39 install: build $(PYVERS:%=install-python%)
40 find $(DBGROOT) ! -type d ! -name '*_d.so' | xargs rm -f
41 find $(DBGROOT) -depth -empty -print0|xargs -r0 rmdir
44 python$* setup.py install --root $(PKGROOT) --install-layout=deb
45 python$*-dbg setup.py install --root $(DBGROOT) --install-layout=deb
47 # Build architecture-dependent files here.
48 binary-arch: build install
53 dh_strip -ppython-pylibacl --dbg-package=python-pylibacl-dbg
54 rm -rf $(DBGROOT)/usr/share/doc/python-pylibacl-dbg
55 ln -s python-pylibacl $(DBGROOT)/usr/share/doc/python-pylibacl-dbg
65 # Build architecture independant packages here.
66 binary-indep: build install
69 binary: binary-arch binary-indep
70 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure