]>
Commit | Line | Data |
---|---|---|
20259a08 GG |
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. | |
acdd928d | 6 | export DH_VERBOSE=2 |
2040f049 GG |
7 | |
8 | # for dpatch | |
9 | include /usr/share/dpatch/dpatch.make | |
20259a08 | 10 | |
20259a08 GG |
11 | |
12 | CFLAGS = -fsigned-char -Wall | |
13 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) | |
14 | CFLAGS += -O0 | |
15 | else | |
16 | CFLAGS += -O2 | |
17 | endif | |
18 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) | |
19 | INSTALL_PROGRAM = install -s | |
20 | else | |
21 | INSTALL_PROGRAM = install | |
22 | endif | |
23 | ||
2040f049 | 24 | |
20259a08 | 25 | configure: configure-stamp |
2040f049 | 26 | configure-stamp: patch-stamp |
20259a08 | 27 | dh_testdir |
2040f049 | 28 | ./autogen.sh |
20259a08 GG |
29 | CFLAGS="${CFLAGS}" ./configure --prefix=/usr \ |
30 | --sysconfdir=/etc \ | |
31 | --mandir=/usr/share/man \ | |
32 | --with-initscriptdir=/etc/init.d \ | |
33 | --with-docdir=/usr/share/doc/smartmontools | |
2040f049 | 34 | |
20259a08 GG |
35 | touch configure-stamp |
36 | ||
37 | ||
38 | build: build-stamp | |
2040f049 | 39 | build-stamp: configure-stamp |
20259a08 GG |
40 | dh_testdir |
41 | ||
42 | # Add here commands to compile the package. | |
43 | $(MAKE) | |
44 | ||
45 | #/usr/bin/docbook-to-man debian/smartmontools.sgml > smartmontools.1 | |
46 | ||
47 | touch build-stamp | |
48 | ||
2040f049 | 49 | clean: unpatch |
20259a08 GG |
50 | dh_testdir |
51 | dh_testroot | |
20259a08 GG |
52 | # rm -f debian/logcheck.logcheck.ignore.* |
53 | ||
54 | # Add here commands to clean up after the build process. | |
55 | -$(MAKE) distclean | |
4d98553f | 56 | rm -f build-stamp configure-stamp \ |
1b4c984c | 57 | Makefile.in examplescripts/Makefile.in aclocal.m4 configure |
4d98553f | 58 | |
20259a08 GG |
59 | |
60 | dh_clean | |
61 | ||
62 | install: build | |
63 | dh_testdir | |
64 | dh_testroot | |
65 | dh_clean -k | |
66 | dh_installdirs | |
67 | ||
68 | $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \ | |
69 | INSTALL_PROGRAM="${INSTALL_PROGRAM}" install-sbinPROGRAMS | |
70 | $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \ | |
71 | install-sysconfDATA | |
72 | $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \ | |
73 | install-man | |
74 | $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \ | |
75 | examplesdir='$$(docdir)/examples' \ | |
76 | -C examplescripts/ install-examplesSCRIPTS install-examplesDATA | |
77 | ||
78 | install -D -m 755 debian/smartmontools-bug \ | |
79 | $(CURDIR)/debian/smartmontools/usr/share/bug/smartmontools | |
80 | install -D -m 755 debian/smartd-runner \ | |
81 | $(CURDIR)/debian/smartmontools/usr/share/smartmontools/smartd-runner | |
82 | install -D -m 755 debian/10mail \ | |
83 | $(CURDIR)/debian/smartmontools/etc/smartmontools/run.d/10mail | |
84 | # for T in paranoid server workstation; do \ | |
85 | # cp debian/smartmontools.logcheck.ignore \ | |
86 | # debian/logcheck.logcheck.ignore.$${T}; \ | |
87 | # done | |
88 | ||
89 | # Build architecture-independent files here. | |
90 | binary-indep: build install | |
91 | # We have nothing to do by default. | |
92 | ||
93 | # Build architecture-dependent files here. | |
94 | binary-arch: build install | |
95 | dh_testdir | |
96 | dh_testroot | |
97 | # dh_installdebconf | |
98 | dh_installdocs | |
99 | dh_installexamples | |
100 | dh_installmenu | |
101 | # dh_installlogrotate | |
102 | # dh_installemacsen | |
103 | # dh_installpam | |
104 | # dh_installmime | |
105 | dh_installinit | |
106 | dh_installcron | |
107 | dh_installman | |
108 | dh_installinfo | |
109 | # dh_installlogcheck | |
110 | # dh_undocumented | |
111 | dh_installchangelogs CHANGELOG | |
112 | dh_link | |
113 | dh_strip | |
114 | dh_compress | |
115 | dh_fixperms | |
116 | # dh_makeshlibs | |
117 | dh_installdeb | |
118 | # dh_perl | |
119 | dh_shlibdeps | |
120 | dh_gencontrol | |
121 | dh_md5sums | |
122 | dh_builddeb | |
123 | ||
124 | binary: binary-indep binary-arch | |
125 | .PHONY: build clean binary-indep binary-arch binary install configure |