1 |
#!/usr/bin/make -f |
2 |
# -*- makefile -*- |
3 |
# Sample debian/rules that uses debhelper. |
4 |
# GNU copyright 1997 to 1999 by Joey Hess. |
5 |
|
6 |
# Uncomment this to turn on verbose mode. |
7 |
#export DH_VERBOSE=1 |
8 |
|
9 |
# This is the debhelper compatibility version to use. |
10 |
export DH_COMPAT=4 |
11 |
|
12 |
# These are used for cross-compiling and for saving the configure script |
13 |
# from having to guess our platform (since we know it already) |
14 |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
15 |
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
16 |
|
17 |
|
18 |
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
19 |
CFLAGS += -g |
20 |
endif |
21 |
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
22 |
INSTALL_PROGRAM += -s |
23 |
endif |
24 |
|
25 |
config.status: configure |
26 |
dh_testdir |
27 |
# Add here commands to configure the package. |
28 |
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info |
29 |
|
30 |
|
31 |
build: build-stamp |
32 |
build-stamp: config.status |
33 |
dh_testdir |
34 |
|
35 |
# Add here commands to compile the package. |
36 |
$(MAKE) |
37 |
|
38 |
# the build should fail if the tests are not successful |
39 |
#$(MAKE) check |
40 |
|
41 |
# generate Doxygen API documentation |
42 |
$(MAKE) docs |
43 |
|
44 |
touch build-stamp |
45 |
|
46 |
clean: |
47 |
dh_testdir |
48 |
dh_testroot |
49 |
rm -f build-stamp |
50 |
|
51 |
# Add here commands to clean up after the build process. |
52 |
-$(MAKE) distclean |
53 |
|
54 |
dh_clean -a |
55 |
|
56 |
install: build |
57 |
dh_testdir |
58 |
dh_testroot |
59 |
dh_clean -k -a |
60 |
dh_installdirs |
61 |
|
62 |
# Add here commands to install the package into debian/tmp |
63 |
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
64 |
|
65 |
# Build architecture-independent files here. |
66 |
binary-indep: build install |
67 |
# We have nothing to do by default. |
68 |
|
69 |
# Build architecture-dependent files here. |
70 |
binary-arch: build install |
71 |
dh_testdir |
72 |
dh_testroot |
73 |
dh_install -a --list-missing |
74 |
dh_installchangelogs -a ChangeLog |
75 |
dh_installdocs -a |
76 |
# dh_installexamples |
77 |
# dh_installmenu |
78 |
# dh_installdebconf |
79 |
# dh_installlogrotate |
80 |
# dh_installemacsen |
81 |
# dh_installpam |
82 |
# dh_installmime |
83 |
# dh_installinit |
84 |
# dh_installcron |
85 |
# dh_installinfo |
86 |
dh_installman |
87 |
# dh_link |
88 |
dh_strip -a |
89 |
dh_compress -a |
90 |
dh_fixperms -a |
91 |
# dh_perl |
92 |
# dh_python |
93 |
dh_makeshlibs -plibgig |
94 |
dh_installdeb -a |
95 |
dh_shlibdeps -plibgig |
96 |
dh_shlibdeps -pgigtools -ldebian/tmp/usr/lib |
97 |
dh_gencontrol -a |
98 |
dh_md5sums -a |
99 |
dh_builddeb -a |
100 |
|
101 |
binary: binary-indep binary-arch |
102 |
.PHONY: build clean binary-indep binary-arch binary install |