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