1 | #!/usr/bin/make -f |
---|
2 | # Based on sample debian/rules that uses debhelper, |
---|
3 | # GPL copyright 1997 to 1999 by Joey Hess. |
---|
4 | # |
---|
5 | # Copyright (C) 2001 Wookey |
---|
6 | # Copyright (C) 2001,2002,2003,2004 Olly Betts |
---|
7 | # |
---|
8 | # This is a multibinary package. You can build any of the binary packages |
---|
9 | # independently, via binary-<package> targets. |
---|
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 | |
---|
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 | |
---|
29 | build: build-stamp |
---|
30 | build-stamp: |
---|
31 | dh_testdir |
---|
32 | |
---|
33 | ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-docdir=\$${prefix}/share/doc/survex CFLAGS=$(CFLAGS) STRIP=$(STRIP) |
---|
34 | $(MAKE) |
---|
35 | ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) |
---|
36 | $(MAKE) check |
---|
37 | endif |
---|
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. |
---|
89 | #binary-indep: |
---|
90 | # $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
---|
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 | |
---|
100 | binary: binary-arch |
---|
101 | .PHONY: build clean binary-indep binary-arch binary install |
---|