]> git.k1024.org Git - debian-pyxattr.git/blob - debian/rules
Import ubuntu patch for #591634
[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: $(PYVERS:%=build-python%) build-indep
17         touch $@
18
19 build-python%:
20         python$* setup.py build
21         python$*-dbg setup.py build
22         touch $@
23
24 build-indep:
25         ./setup.py build_ext -i && epydoc --config epydoc.conf
26         touch $@
27
28 clean:
29         dh_testdir
30         dh_testroot
31         rm -f build-arch-stamp build-indep #CONFIGURE-STAMP#
32         rm -rf build html
33         rm -f xattr.so
34         rm -f $(PYVERS:%=build-python%)
35         dh_clean
36
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
40
41 install-python%:
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
44
45 # Build architecture-dependent files here.
46 binary-arch: build install
47         dh_testdir
48         dh_testroot
49         dh_installchangelogs
50         dh_installdocs
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
54         dh_compress -X.js
55         dh_fixperms
56         dh_pysupport
57         dh_installdeb
58         dh_shlibdeps
59         dh_gencontrol
60         dh_md5sums
61         dh_builddeb
62
63 # Build architecture independant packages here.
64 binary-indep: build install
65 # Nothing to do
66
67 binary: binary-arch binary-indep
68 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure