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