]> git.k1024.org Git - debian-pyxattr.git/blob - debian/rules
Switch to dh_python2
[debian-pyxattr.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4 #
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
7
8 # Uncomment this to turn on verbose mode.
9 #export DH_VERBOSE=1
10
11 # This has to be exported to make some magic below work.
12 export DH_OPTIONS
13
14 PYVERS := $(shell pyversions -vr)
15
16 build: build-arch build-indep
17         touch $@
18
19 build-arch: $(PYVERS:%=build-python%)
20         touch $@
21
22 build-python%:
23         python$* setup.py build
24         python$*-dbg setup.py build
25         touch $@
26
27 build-indep:
28         $(MAKE) doc
29         touch $@
30
31 clean:
32         dh_testdir
33         dh_testroot
34         rm -f build-arch-stamp build-indep #CONFIGURE-STAMP#
35         $(MAKE) clean
36         rm -f $(PYVERS:%=build-python%)
37         rm -rf pxattr.egg-info
38         dh_clean
39
40 install: build $(PYVERS:%=install-python%)
41         find debian/python-pyxattr-dbg ! -type d ! -name '*_d.so' | xargs rm -f
42         find debian/python-pyxattr-dbg -depth -empty -print0 | xargs -r0 rmdir
43
44 install-python%:
45         python$* setup.py install --root $(CURDIR)/debian/python-pyxattr --install-layout=deb
46         python$*-dbg setup.py install --root $(CURDIR)/debian/python-pyxattr-dbg --install-layout=deb
47
48 # Build architecture-dependent files here.
49 binary-arch: build install
50         dh_testdir
51         dh_testroot
52         dh_installchangelogs
53         dh_installdocs
54         dh_sphinxdoc
55         dh_strip -ppython-pyxattr --dbg-package=python-pyxattr-dbg
56         rm -rf debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg
57         ln -s python-pyxattr debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg
58         dh_compress -X.js
59         dh_fixperms
60         dh_python2
61         dh_installdeb
62         dh_shlibdeps
63         dh_gencontrol
64         dh_md5sums
65         dh_builddeb
66
67 # Build architecture independant packages here.
68 binary-indep: build install
69 # Nothing to do
70
71 binary: binary-arch binary-indep
72 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure