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
11 DEB_BUILD_ARCH_OS ?
= $(shell dpkg-architecture
-qDEB_BUILD_ARCH_OS
)
12 DEB_BUILD_ARCH_CPU ?
= $(shell dpkg-architecture
-qDEB_BUILD_ARCH_CPU
)
14 ifeq ($(DEB_HOST_ARCH_OS
),linux
)
15 CONFIGURE_ARGS
+= --with-selinux
18 CFLAGS
+= -fsigned-char
-Wall
19 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
24 ifeq (,$(findstring nostrip
,$(DEB_BUILD_OPTIONS
)))
25 INSTALL_PROGRAM
= install -s
27 INSTALL_PROGRAM
= install
30 PACKAGE
= smartmontools
31 SRC_VERSION
:= $(shell dpkg-parsechangelog | sed
-ne
's/^Version: \(.*\)-.*/\1/p'| cut
-d
':' -f2
)
32 SVN_REVISION
:= $(shell echo
$(SRC_VERSION
) | awk
-F
"+" '{ print $$2 }' | sed
's/svn//' )
33 TARBALL
= $(PACKAGE
)_
$(SRC_VERSION
).orig.
tar.gz
36 rm -rf get-orig-source
$(TARBALL
)
38 svn
export -r
$(SVN_REVISION
) https
://smartmontools.svn.sourceforge.net
/svnroot
/smartmontools
/trunk
/smartmontools
/ \
39 get-orig-source
/$(PACKAGE
)-$(SRC_VERSION
).orig
40 GZIP
=--best
tar czf
$(TARBALL
) -C get-orig-source
$(PACKAGE
)-$(SRC_VERSION
).orig
41 rm -rf get-orig-source
42 echo
" "$(TARBALL
)" created; move it to the right destination to build the package"
44 configure
: configure-stamp
45 configure-stamp
: debian
/stamp-patched
48 CFLAGS
="${CFLAGS}" .
/configure
--prefix=/usr \
50 --mandir=/usr
/share
/man \
51 --with-initscriptdir
=/etc
/init.d \
52 --with-docdir
=/usr
/share
/doc
/smartmontools \
55 --enable-attributelog \
56 --with-savestates
=/var
/lib
/smartmontools
/smartd. \
57 --with-attributelog
=/var
/lib
/smartmontools
/attrlog. \
58 --with-exampledir
=/usr
/share
/doc
/smartmontools
/examples
/ \
64 build-stamp
: configure-stamp
66 # Add here commands to compile the package.
73 # rm -f debian/logcheck.logcheck.ignore.*
74 # Add here commands to clean up after the build process.
75 [ ! -f Makefile
] ||
$(MAKE
) distclean
76 rm -f build-stamp configure-stamp \
77 Makefile.in examplescripts
/Makefile.in aclocal.m4 configure
85 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools
install
86 install -D
-m
755 debian
/smartmontools-bug \
87 $(CURDIR
)/debian
/smartmontools
/usr
/share
/bug
/smartmontools
89 # Build architecture-independent files here.
91 # We have nothing to do by default.
93 # Build architecture-dependent files here.
94 binary-arch
: build
install
102 dh_installinit
-- start
20 2 3 4 5 . stop
20 1 .
107 dh_installchangelogs CHANGELOG
112 chmod
755 $(CURDIR
)/debian
/smartmontools
/etc
/smartmontools
/run.d
/10mail \
113 $(CURDIR
)/debian
/smartmontools
/etc
/smartmontools
/run.d
/10powersave-notify \
114 $(CURDIR
)/debian
/smartmontools
/usr
/share
/smartmontools
/smartd-runner
122 binary
: binary-indep binary-arch
123 .PHONY
: build
clean binary-indep binary-arch binary
install configure get-orig-source