]> git.proxmox.com Git - mirror_smartmontools-debian.git/blob - debian/rules
switch from dpatch to quilt
[mirror_smartmontools-debian.git] / debian / rules
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 # for quilt
9 include /usr/share/quilt/quilt.make
10
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
24
25 configure: configure-stamp
26 configure-stamp: debian/stamp-patched
27 dh_testdir
28 ./autogen.sh
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
34
35 touch configure-stamp
36
37
38 build: build-stamp
39 build-stamp: configure-stamp
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
49 clean: unpatch
50 dh_testdir
51 dh_testroot
52 # rm -f debian/logcheck.logcheck.ignore.*
53
54 # Add here commands to clean up after the build process.
55 -$(MAKE) distclean
56 rm -f build-stamp configure-stamp \
57 Makefile.in examplescripts/Makefile.in aclocal.m4 configure
58 dh_clean
59
60 install: build
61 dh_testdir
62 dh_testroot
63 dh_clean -k
64 dh_installdirs
65
66 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
67 INSTALL_PROGRAM="${INSTALL_PROGRAM}" install-sbinPROGRAMS
68 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
69 install-sysconfDATA
70 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
71 install-man
72 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
73 examplesdir='$$(docdir)/examples' \
74 -C examplescripts/ install-examplesSCRIPTS install-examplesDATA
75
76 install -D -m 755 debian/smartmontools-bug \
77 $(CURDIR)/debian/smartmontools/usr/share/bug/smartmontools
78 install -D -m 755 debian/smartd-runner \
79 $(CURDIR)/debian/smartmontools/usr/share/smartmontools/smartd-runner
80 install -D -m 755 debian/10mail \
81 $(CURDIR)/debian/smartmontools/etc/smartmontools/run.d/10mail
82
83 # Build architecture-independent files here.
84 binary-indep:
85 # We have nothing to do by default.
86
87 # Build architecture-dependent files here.
88 binary-arch: build install
89 dh_testdir
90 dh_testroot
91 # dh_installdebconf
92 dh_installdocs
93 dh_installexamples
94 dh_installmenu
95 dh_installlogrotate
96 # dh_installemacsen
97 # dh_installpam
98 # dh_installmime
99 dh_installinit
100 dh_installcron
101 dh_installman
102 dh_installinfo
103 # dh_installlogcheck
104 # dh_undocumented
105 dh_installchangelogs CHANGELOG
106 dh_link
107 dh_strip
108 dh_compress
109 dh_fixperms
110 # dh_makeshlibs
111 dh_installdeb
112 # dh_perl
113 dh_shlibdeps
114 dh_gencontrol
115 dh_md5sums
116 dh_builddeb
117
118 binary: binary-indep binary-arch
119 .PHONY: build clean binary-indep binary-arch binary install configure