blob: e886b4805a85e721e444be9d5dbf297637b00f3f [file] [log] [blame]
Jean-Paul Calderone897bc252008-02-18 20:50:23 -05001#!/usr/bin/make -f
2# Sample debian/rules that uses debhelper.
3# GNU copyright 1997 by Joey Hess.
4#
5# This version is for a hypothetical package that builds an
6# architecture-dependant package, as well as an architecture-independent
7# package.
8
9# Uncomment this to turn on verbose mode.
10#export DH_VERBOSE=1
11
12PYVERS := $(shell pyversions -r)
13
14build: build-stamp
15build-stamp:
16 dh_testdir
17
18 set -e; \
19 for py in $(PYVERS); do \
20 $$py setup.py build; \
21 $$py-dbg setup.py build; \
22 done
23
24 touch build-stamp
25
26clean:
27 dh_testdir
28 dh_testroot
29 rm -f build-stamp
30
31 -for py in $(PYVERS); do \
32 $$py setup.py clean --all; \
33 $$py-dbg setup.py clean --all; \
34 done
35 rm -rf build version.pyc
36
37 dh_clean
38
39install: DH_OPTIONS=
40install: build
41 dh_testdir
42 dh_testroot
43 dh_clean -k
44 dh_installdirs
45
46 set -e; \
47 for py in $(PYVERS); do \
48 echo "installing for $$py ..."; \
49 $$py setup.py install --root=$(CURDIR)/debian/python-pyopenssl; \
50 echo "installing for $$py-dbg ..."; \
51 $$py-dbg setup.py install --root=$(CURDIR)/debian/python-pyopenssl-dbg; \
52 done
53 find debian/python-pyopenssl-dbg ! -type d ! -name '*_d.so' | xargs rm -f
54 find debian/python-pyopenssl-dbg -depth -empty -exec rmdir {} \;
55
56# Build architecture-independent files here.
57# Pass -i to all debhelper commands in this target to reduce clutter.
58binary-indep: build install
59 dh_testdir -i
60 dh_testroot -i
61 dh_installdocs -i
62 dh_installexamples -i
63# dh_installmenu -i
64# dh_installcron -i
65# dh_installinfo -i
66 dh_installchangelogs ChangeLog -i
67# dh_link -i
68 dh_compress -i
69 dh_fixperms -i
70 dh_pysupport -i
71 dh_python -i
72 dh_installdeb -i
73 dh_gencontrol -i
74 dh_md5sums -i
75 dh_builddeb -i
76
77# Build architecture-dependent files here.
78binary-arch: build install
79 dh_testdir -a
80 dh_testroot -a
81 dh_installdocs -a
82 dh_installexamples -a
83# dh_installmenu -a
84# dh_installcron -a
85# dh_installinfo -a
86 dh_installchangelogs ChangeLog -a
87 dh_strip -ppython-pyopenssl --dbg-package=python-pyopenssl-dbg
88# dh_link -a
89 rm -rf debian/python-pyopenssl-dbg/usr/share/doc/python-pyopenssl-dbg
90 ln -s python-pyopenssl debian/python-pyopenssl-dbg/usr/share/doc/python-pyopenssl-dbg
91 dh_compress -a
92 dh_fixperms -a
93 dh_pysupport -a
94 dh_makeshlibs -a
95 dh_installdeb -a
96 dh_shlibdeps -a
97 dh_gencontrol -a
98 dh_md5sums -a
99 dh_builddeb -a
100
101binary: binary-indep binary-arch
102.PHONY: build clean binary-indep binary-arch binary install