]> git.k1024.org Git - debian-pylibacl.git/blob - debian/rules
Switch from py_support to dh_python2
[debian-pylibacl.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 PKGROOT=debian/python-pylibacl
17 DBGROOT=debian/python-pylibacl-dbg
18
19 build: build-arch build-indep
20         touch $@
21
22 build-arch: $(PYVERS:%=build-python%)
23         touch $@
24
25 build-python%:
26         python$* setup.py build
27         python$*-dbg setup.py build
28         touch $@
29
30 build-indep:
31         $(MAKE) doc
32         touch $@
33
34 clean:
35         dh_testdir
36         dh_testroot
37         rm -f build-arch-stamp build-indep #CONFIGURE-STAMP#
38         $(MAKE) clean
39         rm -f $(PYVERS:%=build-python%)
40         dh_clean
41
42 install: build $(PYVERS:%=install-python%)
43         find $(DBGROOT) ! -type d ! -name '*_d.so' | xargs rm -f
44         find $(DBGROOT) -depth -empty -print0|xargs -r0 rmdir
45
46 install-python%:
47         python$* setup.py install --root $(PKGROOT) --install-layout=deb
48         python$*-dbg setup.py install --root $(DBGROOT) --install-layout=deb
49
50 # Build architecture-dependent files here.
51 binary-arch: build install
52         dh_testdir
53         dh_testroot
54         dh_installchangelogs
55         dh_installdocs
56         dh_sphinxdoc
57         dh_strip -ppython-pylibacl --dbg-package=python-pylibacl-dbg
58         rm -rf $(DBGROOT)/usr/share/doc/python-pylibacl-dbg
59         ln -s python-pylibacl $(DBGROOT)/usr/share/doc/python-pylibacl-dbg
60         dh_compress -X.js
61         dh_fixperms
62         dh_python2
63         dh_installdeb
64         dh_shlibdeps
65         dh_gencontrol
66         dh_md5sums
67         dh_builddeb
68
69 # Build architecture independant packages here.
70 binary-indep: build install
71 # Nothing to do
72
73 binary: binary-arch binary-indep
74 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure