2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 export DEB_BUILD_HARDENING
=1
10 DEB_BUILD_ARCH_OS ?
= $(shell dpkg-architecture
-qDEB_BUILD_ARCH_OS
)
11 DEB_BUILD_ARCH_CPU ?
= $(shell dpkg-architecture
-qDEB_BUILD_ARCH_CPU
)
13 ifeq ($(DEB_HOST_ARCH_OS
),linux
)
14 CONFIGURE_ARGS
+= --with-selinux
17 CFLAGS
+= -fsigned-char
-Wall
18 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
23 ifeq (,$(findstring nostrip
,$(DEB_BUILD_OPTIONS
)))
24 INSTALL_PROGRAM
= install -s
26 INSTALL_PROGRAM
= install
29 PACKAGE
= smartmontools
30 SRC_VERSION
:= $(shell dpkg-parsechangelog | sed
-ne
's/^Version: \(.*\)-.*/\1/p'| cut
-d
':' -f2
)
31 SVN_REVISION
:= $(shell echo
$(SRC_VERSION
) | awk
-F
"+" '{ print $$2 }' | sed
's/svn//' )
32 TARBALL
= $(PACKAGE
)_
$(SRC_VERSION
).orig.
tar.gz
35 rm -rf get-orig-source
$(TARBALL
)
37 svn
export -r
$(SVN_REVISION
) https
://smartmontools.svn.sourceforge.net
/svnroot
/smartmontools
/trunk
/smartmontools
/ \
38 get-orig-source
/$(PACKAGE
)-$(SRC_VERSION
).orig
39 GZIP
=--best
tar czf
$(TARBALL
) -C get-orig-source
$(PACKAGE
)-$(SRC_VERSION
).orig
40 rm -rf get-orig-source
41 echo
" "$(TARBALL
)" created; move it to the right destination to build the package"
43 configure
: configure-stamp
47 CFLAGS
="${CFLAGS}" .
/configure
--prefix=/usr \
49 --mandir=/usr
/share
/man \
50 --with-initscriptdir
=no \
51 --with-docdir
=/usr
/share
/doc
/smartmontools \
54 --enable-attributelog \
55 --with-savestates
=/var
/lib
/smartmontools
/smartd. \
56 --with-attributelog
=/var
/lib
/smartmontools
/attrlog. \
57 --with-exampledir
=/usr
/share
/doc
/smartmontools
/examples
/ \
58 --with-drivedbdir
=/var
/lib
/smartmontools
/drivedb \
62 build
: build-arch build-indep
63 build-arch
: build-stamp
64 build-indep
: build-stamp
65 build-stamp
: configure-stamp
67 # Add here commands to compile the package.
74 # rm -f debian/logcheck.logcheck.ignore.*
75 # Add here commands to clean up after the build process.
76 [ ! -f Makefile
] ||
$(MAKE
) distclean
77 rm -f build-stamp configure-stamp \
78 Makefile.in examplescripts
/Makefile.in aclocal.m4 configure
86 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools
install
87 install -D
-m
755 debian
/smartmontools-bug \
88 $(CURDIR
)/debian
/smartmontools
/usr
/share
/bug
/smartmontools
90 # Build architecture-independent files here.
92 # We have nothing to do by default.
94 # Build architecture-dependent files here.
95 binary-arch
: build
install
103 dh_installinit
-- start
20 2 3 4 5 . stop
20 1 .
108 dh_installchangelogs ChangeLog
113 chmod
755 $(CURDIR
)/debian
/smartmontools
/etc
/smartmontools
/run.d
/10mail \
114 $(CURDIR
)/debian
/smartmontools
/etc
/smartmontools
/run.d
/10powersave-notify \
115 $(CURDIR
)/debian
/smartmontools
/usr
/share
/smartmontools
/smartd-runner
123 binary
: binary-indep binary-arch
124 .PHONY
: build
clean binary-indep binary-arch binary
install configure get-orig-source