[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)) |
---|
| 26 | : # Run make check but don't abort if it fails for now - we've only |
---|
| 27 | : # just enabled this so if it fails on any platform, the currently |
---|
| 28 | : # accepted build is equally broken. Remove the '-' once we verified |
---|
| 29 | : # that make check passes on all platforms. |
---|
| 30 | -$(MAKE) check |
---|
| 31 | endif |
---|
[70d428e] | 32 | touch build-stamp |
---|
| 33 | |
---|
| 34 | clean: |
---|
| 35 | dh_testdir |
---|
| 36 | dh_testroot |
---|
| 37 | rm -f build-stamp |
---|
| 38 | |
---|
| 39 | -$(MAKE) distclean |
---|
| 40 | |
---|
| 41 | dh_clean |
---|
| 42 | |
---|
| 43 | install: DH_OPTIONS= |
---|
| 44 | install: build |
---|
| 45 | dh_testdir |
---|
| 46 | dh_testroot |
---|
| 47 | dh_clean -k |
---|
| 48 | dh_installdirs |
---|
| 49 | |
---|
| 50 | $(MAKE) prefix=`pwd`/debian/tmp/usr install |
---|
| 51 | |
---|
| 52 | dh_movefiles |
---|
| 53 | |
---|
| 54 | # This single target is used to build all the packages, all at once, or |
---|
| 55 | # one at a time. So keep in mind: any options passed to commands here will |
---|
| 56 | # affect _all_ packages. Anything you want to only affect one package |
---|
| 57 | # should be put in another target, such as the install target. |
---|
| 58 | binary-common: build install |
---|
| 59 | dh_testdir |
---|
| 60 | dh_testroot |
---|
| 61 | # dh_installdebconf |
---|
| 62 | dh_installdocs |
---|
| 63 | rm -rf debian/tmp/usr/doc |
---|
| 64 | dh_installexamples |
---|
| 65 | dh_installmenu |
---|
| 66 | # dh_installemacsen |
---|
| 67 | # dh_installpam |
---|
| 68 | # dh_installmime |
---|
| 69 | # dh_installinit |
---|
| 70 | # dh_installcron |
---|
| 71 | gzip -9 debian/tmp/usr/share/man/man1/* |
---|
| 72 | mkdir -p debian/survex-aven/usr/share/man/man1 |
---|
| 73 | mv debian/tmp/usr/share/man/man1/aven.1.gz debian/survex-aven/usr/share/man/man1 |
---|
| 74 | # dh_installinfo |
---|
| 75 | # dh_undocumented |
---|
| 76 | dh_installchangelogs |
---|
| 77 | dh_link |
---|
| 78 | dh_strip |
---|
| 79 | dh_compress |
---|
| 80 | dh_fixperms |
---|
| 81 | # dh_suidregister |
---|
| 82 | # dh_makeshlibs |
---|
| 83 | dh_installdeb |
---|
| 84 | # dh_perl |
---|
| 85 | dh_shlibdeps |
---|
| 86 | dh_gencontrol |
---|
| 87 | dh_md5sums |
---|
| 88 | dh_builddeb |
---|
| 89 | |
---|
| 90 | # Build architecture independant packages using the common target. |
---|
| 91 | binary-indep: |
---|
| 92 | # (Uncomment this next line if you have such packages.) |
---|
| 93 | # $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
---|
| 94 | |
---|
| 95 | # Build architecture dependant packages using the common target. |
---|
| 96 | binary-arch: |
---|
| 97 | $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
---|
| 98 | |
---|
| 99 | # Any other binary targets build just one binary package at a time. |
---|
| 100 | binary-%: build install |
---|
| 101 | make -f debian/rules binary-common DH_OPTIONS=-p$* |
---|
| 102 | |
---|
| 103 | binary: binary-indep binary-arch |
---|
| 104 | .PHONY: build clean binary-indep binary-arch binary install |
---|