]> git.proxmox.com Git - mirror_smartmontools-debian.git/blob - debian/rules
Added /etc/smartmontools/run.d/10powersave-notify to enable desktop notification...
[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 PACKAGE = smartmontools
25 SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p'| cut -d':' -f2)
26 SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
27 TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
28
29 get-orig-source:
30 rm -rf get-orig-source $(TARBALL)
31 mkdir get-orig-source
32 svn export -r $(SVN_REVISION) https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools/ \
33 get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
34 GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
35 rm -rf get-orig-source
36 echo " "$(TARBALL)" created; move it to the right destination to build the package"
37
38 configure: configure-stamp
39 configure-stamp: debian/stamp-patched
40 dh_testdir
41 ./autogen.sh
42 CFLAGS="${CFLAGS}" ./configure --prefix=/usr \
43 --sysconfdir=/etc \
44 --mandir=/usr/share/man \
45 --with-initscriptdir=/etc/init.d \
46 --with-docdir=/usr/share/doc/smartmontools
47 touch configure-stamp
48
49
50 build: build-stamp
51 build-stamp: configure-stamp
52 dh_testdir
53 # Add here commands to compile the package.
54 $(MAKE)
55 touch build-stamp
56
57 clean: unpatch
58 dh_testdir
59 dh_testroot
60 # rm -f debian/logcheck.logcheck.ignore.*
61 # Add here commands to clean up after the build process.
62 [ ! -f Makefile ] || $(MAKE) distclean
63 rm -f build-stamp configure-stamp \
64 Makefile.in examplescripts/Makefile.in aclocal.m4 configure
65 dh_clean
66
67 install: build
68 dh_testdir
69 dh_testroot
70 dh_prep
71 dh_installdirs
72 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
73 INSTALL_PROGRAM="${INSTALL_PROGRAM}" install-sbinPROGRAMS
74 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
75 install-sysconfDATA
76 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
77 install-man
78 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
79 examplesdir='$$(docdir)/examples' \
80 -C examplescripts/ install-examplesSCRIPTS install-examplesDATA
81 install -D -m 755 debian/smartmontools-bug \
82 $(CURDIR)/debian/smartmontools/usr/share/bug/smartmontools
83
84 # Build architecture-independent files here.
85 binary-indep:
86 # We have nothing to do by default.
87
88 # Build architecture-dependent files here.
89 binary-arch: build install
90 dh_testdir
91 dh_testroot
92 dh_installdocs
93 dh_installexamples
94 dh_installmenu
95 dh_installlogrotate
96 dh_install
97 dh_installinit -- start 20 2 3 4 5 . stop 20 1 .
98 dh_installcron
99 dh_installman
100 dh_installinfo
101 dh_lintian
102 dh_installchangelogs CHANGELOG
103 dh_link
104 dh_strip
105 dh_compress
106 dh_fixperms
107 chmod 755 $(CURDIR)/debian/smartmontools/etc/smartmontools/run.d/10mail \
108 $(CURDIR)/debian/smartmontools/etc/smartmontools/run.d/10powersave-notify \
109 $(CURDIR)/debian/smartmontools/usr/share/smartmontools/smartd-runner
110 dh_makeshlibs
111 dh_installdeb
112 dh_shlibdeps
113 dh_gencontrol
114 dh_md5sums
115 dh_builddeb
116
117 binary: binary-indep binary-arch
118 .PHONY: build clean binary-indep binary-arch binary install configure get-orig-source