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 |
touch build-stamp |
42 |
|
43 |
clean: |
44 |
dh_testdir |
45 |
dh_testroot |
46 |
rm -f build-stamp |
47 |
|
48 |
# Add here commands to clean up after the build process. |
49 |
-$(MAKE) distclean |
50 |
|
51 |
dh_clean -a |
52 |
|
53 |
install: build |
54 |
dh_testdir |
55 |
dh_testroot |
56 |
dh_clean -k -a |
57 |
dh_installdirs |
58 |
|
59 |
# Add here commands to install the package into debian/tmp |
60 |
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
61 |
|
62 |
# Build architecture-independent files here. |
63 |
binary-indep: build install |
64 |
# We have nothing to do by default. |
65 |
|
66 |
# Build architecture-dependent files here. |
67 |
binary-arch: build install |
68 |
dh_testdir |
69 |
dh_testroot |
70 |
dh_install -a --list-missing |
71 |
dh_installchangelogs -a ChangeLog |
72 |
dh_installdocs -a |
73 |
# dh_installexamples |
74 |
# dh_installmenu |
75 |
# dh_installdebconf |
76 |
# dh_installlogrotate |
77 |
# dh_installemacsen |
78 |
# dh_installpam |
79 |
# dh_installmime |
80 |
# dh_installinit |
81 |
# dh_installcron |
82 |
# dh_installinfo |
83 |
# dh_installman |
84 |
# dh_link |
85 |
dh_strip -a |
86 |
dh_compress -a |
87 |
dh_fixperms -a |
88 |
# dh_perl |
89 |
# dh_python |
90 |
dh_makeshlibs -pliblscp |
91 |
dh_installdeb -a |
92 |
dh_shlibdeps -pliblscp |
93 |
dh_gencontrol -a |
94 |
dh_md5sums -a |
95 |
dh_builddeb -a |
96 |
|
97 |
binary: binary-indep binary-arch |
98 |
.PHONY: build clean binary-indep binary-arch binary install |