Jean-Paul Calderone | a316f58 | 2008-03-04 11:26:44 -0500 | [diff] [blame] | 1 | #!/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 | |
| 12 | # This is the debhelper compatability version to use. |
| 13 | export DH_COMPAT=3 |
| 14 | |
Jean-Paul Calderone | 4752078 | 2008-03-04 12:16:15 -0500 | [diff] [blame] | 15 | VERSIONS = 2.3 2.4 2.5 |
Jean-Paul Calderone | a316f58 | 2008-03-04 11:26:44 -0500 | [diff] [blame] | 16 | |
| 17 | configure: configure-stamp |
| 18 | configure-stamp: |
| 19 | dh_testdir |
| 20 | |
| 21 | for ver in $(VERSIONS); do \ |
| 22 | cp debian/python-pyopenssl.docs debian/python$$ver-pyopenssl.docs; \ |
| 23 | done |
| 24 | |
| 25 | touch configure-stamp |
| 26 | |
| 27 | build: configure-stamp build-stamp |
| 28 | build-stamp: |
| 29 | dh_testdir |
| 30 | |
| 31 | for ver in $(VERSIONS); do \ |
| 32 | /usr/bin/python$$ver setup.py build; \ |
| 33 | done |
| 34 | |
| 35 | touch build-stamp |
| 36 | |
| 37 | clean: |
| 38 | dh_testdir |
| 39 | dh_testroot |
| 40 | rm -f build-stamp configure-stamp |
| 41 | |
| 42 | for ver in $(VERSIONS); do \ |
| 43 | rm -f debian/python$$ver-pyopenssl.docs; \ |
| 44 | done |
| 45 | rm -rf build |
| 46 | |
| 47 | dh_clean |
| 48 | |
| 49 | install: DH_OPTIONS= |
| 50 | install: build |
| 51 | dh_testdir |
| 52 | dh_testroot |
| 53 | dh_clean -k |
| 54 | dh_installdirs |
| 55 | |
| 56 | for ver in $(VERSIONS); do \ |
| 57 | /usr/bin/python$$ver setup.py install --prefix=$(CURDIR)/debian/python$$ver-pyopenssl/usr; \ |
| 58 | done |
| 59 | |
| 60 | # Build architecture-independent files here. |
| 61 | # Pass -i to all debhelper commands in this target to reduce clutter. |
| 62 | binary-indep: build install |
| 63 | dh_testdir -i |
| 64 | dh_testroot -i |
| 65 | dh_installdocs -i |
| 66 | dh_installexamples -i |
| 67 | # dh_installmenu -i |
| 68 | # dh_installcron -i |
| 69 | # dh_installinfo -i |
| 70 | dh_installchangelogs ChangeLog -i |
| 71 | # dh_link -i |
| 72 | dh_compress -i |
| 73 | dh_fixperms -i |
| 74 | dh_python -i |
| 75 | dh_installdeb -i |
| 76 | dh_gencontrol -i |
| 77 | dh_md5sums -i |
| 78 | dh_builddeb -i |
| 79 | |
| 80 | # Build architecture-dependent files here. |
| 81 | binary-arch: build install |
| 82 | dh_testdir -a |
| 83 | dh_testroot -a |
| 84 | dh_installdocs -a |
| 85 | dh_installexamples -a |
| 86 | # dh_installmenu -a |
| 87 | # dh_installcron -a |
| 88 | # dh_installinfo -a |
| 89 | dh_installchangelogs ChangeLog -a |
| 90 | dh_strip -a |
| 91 | # dh_link -a |
| 92 | dh_compress -a |
| 93 | dh_fixperms -a |
| 94 | dh_python -a |
| 95 | dh_makeshlibs -a |
| 96 | dh_installdeb -a |
| 97 | dh_shlibdeps -a |
| 98 | dh_gencontrol -a |
| 99 | dh_md5sums -a |
| 100 | dh_builddeb -a |
| 101 | |
| 102 | binary: binary-indep binary-arch |
| 103 | .PHONY: build clean binary-indep binary-arch binary install configure |