]> git.k1024.org Git - debian-pyxattr.git/blob - debian/rules
Adapt to new upstream build
[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         $(MAKE) doc
26         touch $@
27
28 clean:
29         dh_testdir
30         dh_testroot
31         rm -f build-arch-stamp build-indep #CONFIGURE-STAMP#
32         $(MAKE) clean
33         rm -f $(PYVERS:%=build-python%)
34         rm -rf pxattr.egg-info
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_sphinxdoc
52         dh_strip -ppython-pyxattr --dbg-package=python-pyxattr-dbg
53         rm -rf debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg
54         ln -s python-pyxattr debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg
55         dh_compress -X.js
56         dh_fixperms
57         dh_pysupport
58         dh_installdeb
59         dh_shlibdeps
60         dh_gencontrol
61         dh_md5sums
62         dh_builddeb
63
64 # Build architecture independant packages here.
65 binary-indep: build install
66 # Nothing to do
67
68 binary: binary-arch binary-indep
69 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure