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 build: $(PYVERS:%=build-python%) build-indep
20 python$* setup.py build
21 python$*-dbg setup.py build
25 ./setup.py build_ext -i && epydoc --config epydoc.conf
31 rm -f build-arch-stamp build-indep #CONFIGURE-STAMP#
34 rm -f $(PYVERS:%=build-python%)
37 install: build $(PYVERS:%=install-python%)
38 find debian/python-pyxattr-dbg ! -type d ! -name '*_d.so' | xargs rm -f
39 find debian/python-pyxattr-dbg -depth -empty -print0 | xargs -r0 rmdir
42 python$* setup.py install --root $(CURDIR)/debian/python-pyxattr --install-layout=deb
43 python$*-dbg setup.py install --root $(CURDIR)/debian/python-pyxattr-dbg --install-layout=deb
45 # Build architecture-dependent files here.
46 binary-arch: build install
51 dh_strip -ppython-pyxattr --dbg-package=python-pyxattr-dbg
52 rm -rf debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg
53 ln -s python-pyxattr debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg
63 # Build architecture independant packages here.
64 binary-indep: build install
67 binary: binary-arch binary-indep
68 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure