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 ifeq ($(DEB_BUILD_ARCH_CPU
),armel
)
19 CONFIGURE_ARGS
+= --without-libcap-ng
22 CFLAGS
+= -fsigned-char
-Wall
23 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
28 ifeq (,$(findstring nostrip
,$(DEB_BUILD_OPTIONS
)))
29 INSTALL_PROGRAM
= install -s
31 INSTALL_PROGRAM
= install
34 PACKAGE
= smartmontools
35 SRC_VERSION
:= $(shell dpkg-parsechangelog | sed
-ne
's/^Version: \(.*\)-.*/\1/p'| cut
-d
':' -f2
)
36 SVN_REVISION
:= $(shell echo
$(SRC_VERSION
) | awk
-F
"+" '{ print $$2 }' | sed
's/svn//' )
37 TARBALL
= $(PACKAGE
)_
$(SRC_VERSION
).orig.
tar.gz
40 rm -rf get-orig-source
$(TARBALL
)
42 svn
export -r
$(SVN_REVISION
) https
://smartmontools.svn.sourceforge.net
/svnroot
/smartmontools
/trunk
/smartmontools
/ \
43 get-orig-source
/$(PACKAGE
)-$(SRC_VERSION
).orig
44 GZIP
=--best
tar czf
$(TARBALL
) -C get-orig-source
$(PACKAGE
)-$(SRC_VERSION
).orig
45 rm -rf get-orig-source
46 echo
" "$(TARBALL
)" created; move it to the right destination to build the package"
48 configure
: configure-stamp
49 configure-stamp
: debian
/stamp-patched
52 CFLAGS
="${CFLAGS}" .
/configure
--prefix=/usr \
54 --mandir=/usr
/share
/man \
55 --with-initscriptdir
=/etc
/init.d \
56 --with-docdir
=/usr
/share
/doc
/smartmontools \
62 build-stamp
: configure-stamp
64 # Add here commands to compile the package.
71 # rm -f debian/logcheck.logcheck.ignore.*
72 # Add here commands to clean up after the build process.
73 [ ! -f Makefile
] ||
$(MAKE
) distclean
74 rm -f build-stamp configure-stamp \
75 Makefile.in examplescripts
/Makefile.in aclocal.m4 configure
83 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
84 INSTALL_PROGRAM
="${INSTALL_PROGRAM}" install-sbinPROGRAMS
85 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
87 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
89 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/smartmontools \
90 examplesdir
='$$(docdir)/examples' \
91 -C examplescripts
/ install-examplesSCRIPTS install-examplesDATA
92 install -D
-m
755 debian
/smartmontools-bug \
93 $(CURDIR
)/debian
/smartmontools
/usr
/share
/bug
/smartmontools
95 # Build architecture-independent files here.
97 # We have nothing to do by default.
99 # Build architecture-dependent files here.
100 binary-arch
: build
install
108 dh_installinit
-- start
20 2 3 4 5 . stop
20 1 .
113 dh_installchangelogs CHANGELOG
118 chmod
755 $(CURDIR
)/debian
/smartmontools
/etc
/smartmontools
/run.d
/10mail \
119 $(CURDIR
)/debian
/smartmontools
/etc
/smartmontools
/run.d
/10powersave-notify \
120 $(CURDIR
)/debian
/smartmontools
/usr
/share
/smartmontools
/smartd-runner
128 binary
: binary-indep binary-arch
129 .PHONY
: build
clean binary-indep binary-arch binary
install configure get-orig-source