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 #rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/debian
35 #cd get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/ ; sh ../../debian/remove-nonfree.sh
36 GZIP
=--best
tar czf
$(TARBALL
) -C get-orig-source
$(PACKAGE
)-$(SRC_VERSION
).orig
37 rm -rf get-orig-source
38 echo
" "$(TARBALL
)" created; move it to the right destination to build the package"
40 configure
: configure-stamp
41 configure-stamp
: debian
/stamp-patched
44 CFLAGS
="${CFLAGS}" .
/configure
--prefix=/usr \
46 --mandir=/usr
/share
/man \
47 --with-initscriptdir
=/etc
/init.d \
48 --with-docdir
=/usr
/share
/doc
/smartmontools
54 build-stamp
: configure-stamp
57 # Add here commands to compile the package.
60 #/usr/bin/docbook-to-man debian/smartmontools.sgml > smartmontools.1
67 # rm -f debian/logcheck.logcheck.ignore.*
69 # Add here commands to clean up after the build process.
71 rm -f build-stamp configure-stamp \
72 Makefile.in examplescripts
/Makefile.in aclocal.m4 configure
81 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
82 INSTALL_PROGRAM
="${INSTALL_PROGRAM}" install-sbinPROGRAMS
83 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
85 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
87 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
88 examplesdir
='$$(docdir)/examples' \
89 -C examplescripts
/ install-examplesSCRIPTS install-examplesDATA
91 install -D
-m
755 debian
/smartmontools-bug \
92 $(CURDIR
)/debian
/smartmontools
/usr
/share
/bug
/smartmontools
93 install -D
-m
755 debian
/smartd-runner \
94 $(CURDIR
)/debian
/smartmontools
/usr
/share
/smartmontools
/smartd-runner
95 install -D
-m
755 debian
/10mail \
96 $(CURDIR
)/debian
/smartmontools
/etc
/smartmontools
/run.d
/10mail
98 # Build architecture-independent files here.
100 # We have nothing to do by default.
102 # Build architecture-dependent files here.
103 binary-arch
: build
install
121 dh_installchangelogs CHANGELOG
134 binary
: binary-indep binary-arch
135 .PHONY
: build
clean binary-indep binary-arch binary
install configure get-orig-source