]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - debian/rules
Added /etc/smartmontools/run.d/10powersave-notify to enable desktop notification...
[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.
8b3c2089 6#export DH_VERBOSE=1
2040f049 7
a19d514d
GG
8# for quilt
9include /usr/share/quilt/quilt.make
20259a08 10
20259a08 11
35bece35 12CFLAGS += -fsigned-char -Wall
20259a08
GG
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
35bece35
GI
24PACKAGE = smartmontools
25SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p'| cut -d':' -f2)
26SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
27TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
28
29get-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
35bece35
GI
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"
2040f049 37
20259a08 38configure: configure-stamp
a19d514d 39configure-stamp: debian/stamp-patched
20259a08 40 dh_testdir
2040f049 41 ./autogen.sh
20259a08
GG
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
50build: build-stamp
2040f049 51build-stamp: configure-stamp
20259a08 52 dh_testdir
20259a08
GG
53 # Add here commands to compile the package.
54 $(MAKE)
20259a08
GG
55 touch build-stamp
56
2040f049 57clean: unpatch
20259a08
GG
58 dh_testdir
59 dh_testroot
20259a08 60 # rm -f debian/logcheck.logcheck.ignore.*
20259a08 61 # Add here commands to clean up after the build process.
a52f90d4 62 [ ! -f Makefile ] || $(MAKE) distclean
4d98553f 63 rm -f build-stamp configure-stamp \
1b4c984c 64 Makefile.in examplescripts/Makefile.in aclocal.m4 configure
20259a08
GG
65 dh_clean
66
67install: build
68 dh_testdir
69 dh_testroot
608687b1 70 dh_prep
20259a08 71 dh_installdirs
20259a08
GG
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
20259a08
GG
81 install -D -m 755 debian/smartmontools-bug \
82 $(CURDIR)/debian/smartmontools/usr/share/bug/smartmontools
20259a08
GG
83
84# Build architecture-independent files here.
a19d514d 85binary-indep:
20259a08
GG
86# We have nothing to do by default.
87
88# Build architecture-dependent files here.
89binary-arch: build install
90 dh_testdir
91 dh_testroot
20259a08
GG
92 dh_installdocs
93 dh_installexamples
94 dh_installmenu
486adbce 95 dh_installlogrotate
31e40f75 96 dh_install
9afe5af0 97 dh_installinit -- start 20 2 3 4 5 . stop 20 1 .
20259a08
GG
98 dh_installcron
99 dh_installman
100 dh_installinfo
fd9c6756 101 dh_lintian
20259a08
GG
102 dh_installchangelogs CHANGELOG
103 dh_link
104 dh_strip
105 dh_compress
106 dh_fixperms
31e40f75 107 chmod 755 $(CURDIR)/debian/smartmontools/etc/smartmontools/run.d/10mail \
52b4501b 108 $(CURDIR)/debian/smartmontools/etc/smartmontools/run.d/10powersave-notify \
31e40f75
GI
109 $(CURDIR)/debian/smartmontools/usr/share/smartmontools/smartd-runner
110 dh_makeshlibs
20259a08 111 dh_installdeb
20259a08
GG
112 dh_shlibdeps
113 dh_gencontrol
114 dh_md5sums
115 dh_builddeb
116
117binary: binary-indep binary-arch
35bece35 118.PHONY: build clean binary-indep binary-arch binary install configure get-orig-source