1 | #!/usr/bin/make -f |
---|
2 | # Sample debian/rules that uses debhelper. |
---|
3 | # GNU copyright 1997 to 1999 by Joey Hess. |
---|
4 | |
---|
5 | # Uncomment this to turn on verbose mode. |
---|
6 | #export DH_VERBOSE=1 |
---|
7 | |
---|
8 | |
---|
9 | # These are used for cross-compiling and for saving the configure script |
---|
10 | # from having to guess our platform (since we know it already) |
---|
11 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
---|
12 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
---|
13 | |
---|
14 | |
---|
15 | ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
---|
16 | CFLAGS += -O2 |
---|
17 | endif |
---|
18 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
---|
19 | INSTALL_PROGRAM += -s |
---|
20 | endif |
---|
21 | |
---|
22 | CFLAGS += -g |
---|
23 | |
---|
24 | config.status: configure |
---|
25 | dh_testdir |
---|
26 | # Add here commands to configure the package. |
---|
27 | ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info |
---|
28 | |
---|
29 | |
---|
30 | build: build-stamp |
---|
31 | |
---|
32 | build-stamp: config.status |
---|
33 | dh_testdir |
---|
34 | |
---|
35 | # Add here commands to compile the package. |
---|
36 | $(MAKE) |
---|
37 | #/usr/bin/docbook-to-man debian/owl.sgml > owl.1 |
---|
38 | |
---|
39 | touch build-stamp |
---|
40 | |
---|
41 | clean: |
---|
42 | dh_testdir |
---|
43 | dh_testroot |
---|
44 | rm -f build-stamp |
---|
45 | |
---|
46 | # Add here commands to clean up after the build process. |
---|
47 | -$(MAKE) distclean |
---|
48 | |
---|
49 | dh_clean |
---|
50 | |
---|
51 | install: build |
---|
52 | dh_testdir |
---|
53 | dh_testroot |
---|
54 | dh_clean -k |
---|
55 | dh_installdirs |
---|
56 | |
---|
57 | # Add here commands to install the package into debian/owl. |
---|
58 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
---|
59 | |
---|
60 | dh_install --sourcedir=debian/tmp --fail-missing $(EXCLUDE) |
---|
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_installdebconf |
---|
71 | dh_installdocs doc/intro.txt |
---|
72 | dh_installexamples |
---|
73 | dh_installmenu |
---|
74 | dh_installman |
---|
75 | dh_installinfo |
---|
76 | dh_installchangelogs ChangeLog |
---|
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 | binary: binary-indep binary-arch |
---|
90 | .PHONY: build clean binary-indep binary-arch binary install |
---|