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