2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
9 include /usr
/share
/quilt
/quilt.make
12 CFLAGS
+= -fsigned-char
-Wall
13 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
18 ifeq (,$(findstring nostrip
,$(DEB_BUILD_OPTIONS
)))
19 INSTALL_PROGRAM
= install -s
21 INSTALL_PROGRAM
= install
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
30 rm -rf get-orig-source
$(TARBALL
)
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"
38 configure
: configure-stamp
39 configure-stamp
: debian
/stamp-patched
42 CFLAGS
="${CFLAGS}" .
/configure
--prefix=/usr \
44 --mandir=/usr
/share
/man \
45 --with-initscriptdir
=/etc
/init.d \
46 --with-docdir
=/usr
/share
/doc
/smartmontools
51 build-stamp
: configure-stamp
53 # Add here commands to compile the package.
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
72 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
73 INSTALL_PROGRAM
="${INSTALL_PROGRAM}" install-sbinPROGRAMS
74 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
76 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
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
84 # Build architecture-independent files here.
86 # We have nothing to do by default.
88 # Build architecture-dependent files here.
89 binary-arch
: build
install
97 dh_installinit
-- start
20 2 3 4 5 . stop
20 1 .
102 dh_installchangelogs CHANGELOG
107 chmod
755 $(CURDIR
)/debian
/smartmontools
/etc
/smartmontools
/run.d
/10mail \
108 $(CURDIR
)/debian
/smartmontools
/usr
/share
/smartmontools
/smartd-runner
116 binary
: binary-indep binary-arch
117 .PHONY
: build
clean binary-indep binary-arch binary
install configure get-orig-source