]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - debian/rules
Updated to standards version 3.8.3 (No changes needed)
[mirror_smartmontools-debian.git] / debian / rules
CommitLineData
20259a08
GG
1#!/usr/bin/make -f
2# Sample debian/rules that uses debhelper.
3# GNU copyright 1997 to 1999 by Joey Hess.
4
5# Uncomment this to turn on verbose mode.
8b3c2089 6#export DH_VERBOSE=1
2040f049 7
a19d514d
GG
8# for quilt
9include /usr/share/quilt/quilt.make
20259a08 10
20259a08 11
35bece35 12CFLAGS += -fsigned-char -Wall
20259a08
GG
13ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
14 CFLAGS += -O0
15else
16 CFLAGS += -O2
17endif
18ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
19 INSTALL_PROGRAM = install -s
20else
21 INSTALL_PROGRAM = install
22endif
23
35bece35
GI
24PACKAGE = smartmontools
25SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p'| cut -d':' -f2)
26SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
27TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
28
29get-orig-source:
30 rm -rf get-orig-source $(TARBALL)
31 mkdir get-orig-source
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"
2040f049 39
20259a08 40configure: configure-stamp
a19d514d 41configure-stamp: debian/stamp-patched
20259a08 42 dh_testdir
2040f049 43 ./autogen.sh
20259a08
GG
44 CFLAGS="${CFLAGS}" ./configure --prefix=/usr \
45 --sysconfdir=/etc \
46 --mandir=/usr/share/man \
47 --with-initscriptdir=/etc/init.d \
48 --with-docdir=/usr/share/doc/smartmontools
2040f049 49
20259a08
GG
50 touch configure-stamp
51
52
53build: build-stamp
2040f049 54build-stamp: configure-stamp
20259a08
GG
55 dh_testdir
56
57 # Add here commands to compile the package.
58 $(MAKE)
59
60 #/usr/bin/docbook-to-man debian/smartmontools.sgml > smartmontools.1
61
62 touch build-stamp
63
2040f049 64clean: unpatch
20259a08
GG
65 dh_testdir
66 dh_testroot
20259a08
GG
67 # rm -f debian/logcheck.logcheck.ignore.*
68
69 # Add here commands to clean up after the build process.
70 -$(MAKE) distclean
4d98553f 71 rm -f build-stamp configure-stamp \
1b4c984c 72 Makefile.in examplescripts/Makefile.in aclocal.m4 configure
20259a08
GG
73 dh_clean
74
75install: build
76 dh_testdir
77 dh_testroot
78 dh_clean -k
79 dh_installdirs
80
81 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
82 INSTALL_PROGRAM="${INSTALL_PROGRAM}" install-sbinPROGRAMS
83 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
84 install-sysconfDATA
85 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
86 install-man
87 $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools \
88 examplesdir='$$(docdir)/examples' \
89 -C examplescripts/ install-examplesSCRIPTS install-examplesDATA
90
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
20259a08
GG
97
98# Build architecture-independent files here.
a19d514d 99binary-indep:
20259a08
GG
100# We have nothing to do by default.
101
102# Build architecture-dependent files here.
103binary-arch: build install
104 dh_testdir
105 dh_testroot
106# dh_installdebconf
107 dh_installdocs
108 dh_installexamples
109 dh_installmenu
486adbce 110 dh_installlogrotate
20259a08
GG
111# dh_installemacsen
112# dh_installpam
113# dh_installmime
9afe5af0 114 dh_installinit -- start 20 2 3 4 5 . stop 20 1 .
20259a08
GG
115 dh_installcron
116 dh_installman
117 dh_installinfo
fd9c6756 118 dh_lintian
20259a08
GG
119# dh_installlogcheck
120# dh_undocumented
121 dh_installchangelogs CHANGELOG
122 dh_link
123 dh_strip
124 dh_compress
125 dh_fixperms
126# dh_makeshlibs
127 dh_installdeb
128# dh_perl
129 dh_shlibdeps
130 dh_gencontrol
131 dh_md5sums
132 dh_builddeb
133
134binary: binary-indep binary-arch
35bece35 135.PHONY: build clean binary-indep binary-arch binary install configure get-orig-source