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)
15 PY3VERS := $(shell py3versions -vr)
17 PKGROOT=debian/python-pylibacl
18 DBGROOT=debian/python-pylibacl-dbg
19 PKG3ROOT=debian/python3-pylibacl
20 DBG3ROOT=debian/python3-pylibacl-dbg
22 build: build-arch build-indep
25 build-arch: $(PYVERS:%=build-python%) $(PY3VERS:%=build-python%)
29 python$* setup.py build
30 python$*-dbg setup.py build
40 rm -f build-arch-stamp build-indep #CONFIGURE-STAMP#
42 rm -f $(PYVERS:%=build-python%)
43 rm -f $(PY3VERS:%=build-python%)
46 install: build $(PYVERS:%=install-python%) $(PY3VERS:%=install-python%)
47 find $(DBGROOT) ! -type d ! -name '*_d.so' | xargs rm -f
48 find $(DBGROOT) -depth -empty -print0|xargs -r0 rmdir
51 python2$* setup.py install --root $(PKGROOT) --install-layout=deb
52 python2$*-dbg setup.py install --root $(DBGROOT) --install-layout=deb
55 python3$* setup.py install --root $(PKG3ROOT) --install-layout=deb
56 python3$*-dbg setup.py install --root $(DBG3ROOT) --install-layout=deb
58 # Build architecture-dependent files here.
59 binary-arch: build install
65 dh_strip -ppython-pylibacl --dbg-package=python-pylibacl-dbg
66 dh_strip -ppython3-pylibacl --dbg-package=python3-pylibacl-dbg
67 rm -rf $(DBGROOT)/usr/share/doc/python-pylibacl-dbg
68 ln -s python-pylibacl $(DBGROOT)/usr/share/doc/python-pylibacl-dbg
69 rm -rf $(DBG3ROOT)/usr/share/doc/python3-pylibacl-dbg
70 ln -s python3-pylibacl $(DBG3ROOT)/usr/share/doc/python3-pylibacl-dbg
81 # Build architecture independant packages here.
82 binary-indep: build install
85 binary: binary-arch binary-indep
86 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure