[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 |
---|
[b462168] | 6 | # Copyright (C) 2001,2002,2003 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 | |
---|
[b462168] | 33 | # need to use GCC 3.2 to link against wxgtk-2.4 |
---|
[577f05b] | 34 | ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-docdir=\$${prefix}/share/doc/survex1.1 CFLAGS=$(CFLAGS) STRIP=$(STRIP) CC=gcc-3.2 CXX=g++-3.2 --datadir=/usr/share/survex1.1 --program-suffix=-1.1 |
---|
[70d428e] | 35 | $(MAKE) |
---|
[7ad2d31] | 36 | ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) |
---|
[50eb45d] | 37 | $(MAKE) check |
---|
[7ad2d31] | 38 | endif |
---|
[70d428e] | 39 | touch build-stamp |
---|
| 40 | |
---|
| 41 | clean: |
---|
| 42 | dh_testdir |
---|
| 43 | dh_testroot |
---|
| 44 | rm -f build-stamp |
---|
| 45 | |
---|
| 46 | -$(MAKE) distclean |
---|
| 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 | $(MAKE) prefix=`pwd`/debian/tmp/usr install |
---|
| 58 | |
---|
| 59 | dh_movefiles |
---|
| 60 | |
---|
| 61 | # This single target is used to build all the packages, all at once, or |
---|
| 62 | # one at a time. So keep in mind: any options passed to commands here will |
---|
| 63 | # affect _all_ packages. Anything you want to only affect one package |
---|
| 64 | # should be put in another target, such as the install target. |
---|
| 65 | binary-common: build install |
---|
| 66 | dh_testdir |
---|
| 67 | dh_testroot |
---|
| 68 | # dh_installdebconf |
---|
| 69 | dh_installdocs |
---|
| 70 | rm -rf debian/tmp/usr/doc |
---|
| 71 | dh_installexamples |
---|
| 72 | dh_installmenu |
---|
| 73 | # dh_installemacsen |
---|
| 74 | # dh_installmime |
---|
| 75 | gzip -9 debian/tmp/usr/share/man/man1/* |
---|
| 76 | dh_installchangelogs |
---|
| 77 | dh_link |
---|
| 78 | dh_strip |
---|
| 79 | dh_compress |
---|
| 80 | dh_fixperms |
---|
| 81 | # dh_makeshlibs |
---|
| 82 | dh_installdeb |
---|
| 83 | # dh_perl |
---|
| 84 | dh_shlibdeps |
---|
| 85 | dh_gencontrol |
---|
| 86 | dh_md5sums |
---|
| 87 | dh_builddeb |
---|
| 88 | |
---|
| 89 | # Build architecture independant packages using the common target. |
---|
| 90 | binary-indep: |
---|
[27b8b59] | 91 | $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
---|
[70d428e] | 92 | |
---|
| 93 | # Build architecture dependant packages using the common target. |
---|
| 94 | binary-arch: |
---|
| 95 | $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
---|
| 96 | |
---|
| 97 | # Any other binary targets build just one binary package at a time. |
---|
| 98 | binary-%: build install |
---|
| 99 | make -f debian/rules binary-common DH_OPTIONS=-p$* |
---|
| 100 | |
---|
| 101 | binary: binary-indep binary-arch |
---|
| 102 | .PHONY: build clean binary-indep binary-arch binary install |
---|