| [70d428e] | 1 | #!/usr/bin/make -f |
|---|
| [b459b95] | 2 | # Based on sample debian/rules that uses debhelper. |
|---|
| [70d428e] | 3 | # GPL copyright 1997 to 1999 by Joey Hess. |
|---|
| [4b4bd47] | 4 | # Copyright (C) 2001 Wookey |
|---|
| [7ad2d31] | 5 | # Copyright (C) 2001,2002 Olly Betts |
|---|
| [70d428e] | 6 | # |
|---|
| [4b4bd47] | 7 | # This is a multibinary package. You to build any of the binary packages |
|---|
| 8 | # independently, via binary-<package> targets. |
|---|
| [70d428e] | 9 | |
|---|
| 10 | # Uncomment this to turn on verbose mode. |
|---|
| 11 | #export DH_VERBOSE=1 |
|---|
| 12 | |
|---|
| 13 | # This is the debhelper compatability version to use. |
|---|
| 14 | export DH_COMPAT=1 |
|---|
| 15 | |
|---|
| 16 | # This has to be exported to make some magic below work. |
|---|
| 17 | export DH_OPTIONS |
|---|
| 18 | |
|---|
| 19 | build: build-stamp |
|---|
| 20 | build-stamp: |
|---|
| 21 | dh_testdir |
|---|
| 22 | |
|---|
| [4b4bd47] | 23 | ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-docdir=\$${prefix}/share/doc/survex |
|---|
| [70d428e] | 24 | $(MAKE) |
|---|
| [7ad2d31] | 25 | ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) |
|---|
| [50eb45d] | 26 | $(MAKE) check |
|---|
| [7ad2d31] | 27 | endif |
|---|
| [70d428e] | 28 | touch build-stamp |
|---|
| 29 | |
|---|
| 30 | clean: |
|---|
| 31 | dh_testdir |
|---|
| 32 | dh_testroot |
|---|
| 33 | rm -f build-stamp |
|---|
| 34 | |
|---|
| 35 | -$(MAKE) distclean |
|---|
| 36 | |
|---|
| 37 | dh_clean |
|---|
| 38 | |
|---|
| 39 | install: DH_OPTIONS= |
|---|
| 40 | install: build |
|---|
| 41 | dh_testdir |
|---|
| 42 | dh_testroot |
|---|
| 43 | dh_clean -k |
|---|
| 44 | dh_installdirs |
|---|
| 45 | |
|---|
| 46 | $(MAKE) prefix=`pwd`/debian/tmp/usr install |
|---|
| 47 | |
|---|
| 48 | dh_movefiles |
|---|
| 49 | |
|---|
| 50 | # This single target is used to build all the packages, all at once, or |
|---|
| 51 | # one at a time. So keep in mind: any options passed to commands here will |
|---|
| 52 | # affect _all_ packages. Anything you want to only affect one package |
|---|
| 53 | # should be put in another target, such as the install target. |
|---|
| 54 | binary-common: build install |
|---|
| 55 | dh_testdir |
|---|
| 56 | dh_testroot |
|---|
| 57 | # dh_installdebconf |
|---|
| 58 | dh_installdocs |
|---|
| 59 | rm -rf debian/tmp/usr/doc |
|---|
| 60 | dh_installexamples |
|---|
| 61 | dh_installmenu |
|---|
| 62 | # dh_installemacsen |
|---|
| 63 | # dh_installpam |
|---|
| 64 | # dh_installmime |
|---|
| 65 | # dh_installinit |
|---|
| 66 | # dh_installcron |
|---|
| 67 | gzip -9 debian/tmp/usr/share/man/man1/* |
|---|
| 68 | mkdir -p debian/survex-aven/usr/share/man/man1 |
|---|
| 69 | mv debian/tmp/usr/share/man/man1/aven.1.gz debian/survex-aven/usr/share/man/man1 |
|---|
| 70 | # dh_installinfo |
|---|
| 71 | # dh_undocumented |
|---|
| 72 | dh_installchangelogs |
|---|
| 73 | dh_link |
|---|
| 74 | dh_strip |
|---|
| 75 | dh_compress |
|---|
| 76 | dh_fixperms |
|---|
| 77 | # dh_suidregister |
|---|
| 78 | # dh_makeshlibs |
|---|
| 79 | dh_installdeb |
|---|
| 80 | # dh_perl |
|---|
| 81 | dh_shlibdeps |
|---|
| 82 | dh_gencontrol |
|---|
| 83 | dh_md5sums |
|---|
| 84 | dh_builddeb |
|---|
| 85 | |
|---|
| 86 | # Build architecture independant packages using the common target. |
|---|
| 87 | binary-indep: |
|---|
| 88 | # (Uncomment this next line if you have such packages.) |
|---|
| 89 | # $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
|---|
| 90 | |
|---|
| 91 | # Build architecture dependant packages using the common target. |
|---|
| 92 | binary-arch: |
|---|
| 93 | $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
|---|
| 94 | |
|---|
| 95 | # Any other binary targets build just one binary package at a time. |
|---|
| 96 | binary-%: build install |
|---|
| 97 | make -f debian/rules binary-common DH_OPTIONS=-p$* |
|---|
| 98 | |
|---|
| 99 | binary: binary-indep binary-arch |
|---|
| 100 | .PHONY: build clean binary-indep binary-arch binary install |
|---|