]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - debian/rules
debian/control: build-depend on dpatch
[mirror_smartmontools-debian.git] / debian / rules
CommitLineData
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.
2040f049
GG
6export DH_VERBOSE=1
7
8# for dpatch
9include /usr/share/dpatch/dpatch.make
20259a08 10
20259a08
GG
11
12CFLAGS = -fsigned-char -Wall
13ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
14 CFLAGS += -O0
15else
16 CFLAGS += -O2
17endif
18ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
19 INSTALL_PROGRAM = install -s
20else
21 INSTALL_PROGRAM = install
22endif
23
2040f049 24
20259a08 25configure: configure-stamp
2040f049 26configure-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
38build: build-stamp
2040f049 39build-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 49clean: unpatch
20259a08
GG
50 dh_testdir
51 dh_testroot
2040f049 52 rm -f build-stamp configure.stamp
20259a08
GG
53 # rm -f debian/logcheck.logcheck.ignore.*
54
55 # Add here commands to clean up after the build process.
56 -$(MAKE) distclean
57
58 dh_clean
59
60install: 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 # for T in paranoid server workstation; do \
83 # cp debian/smartmontools.logcheck.ignore \
84 # debian/logcheck.logcheck.ignore.$${T}; \
85 # done
86
87# Build architecture-independent files here.
88binary-indep: build install
89# We have nothing to do by default.
90
91# Build architecture-dependent files here.
92binary-arch: build install
93 dh_testdir
94 dh_testroot
95# dh_installdebconf
96 dh_installdocs
97 dh_installexamples
98 dh_installmenu
99# dh_installlogrotate
100# dh_installemacsen
101# dh_installpam
102# dh_installmime
103 dh_installinit
104 dh_installcron
105 dh_installman
106 dh_installinfo
107# dh_installlogcheck
108# dh_undocumented
109 dh_installchangelogs CHANGELOG
110 dh_link
111 dh_strip
112 dh_compress
113 dh_fixperms
114# dh_makeshlibs
115 dh_installdeb
116# dh_perl
117 dh_shlibdeps
118 dh_gencontrol
119 dh_md5sums
120 dh_builddeb
121
122binary: binary-indep binary-arch
123.PHONY: build clean binary-indep binary-arch binary install configure