2
# $Id: rules 1511 2011-02-07 19:58:27Z robert $
3
# Sample debian/rules that uses debhelper.
4
# This file is public domain software, originally written by Joey Hess.
6
# This version is for a multibinary package. It also allows you to build any
7
# of the binary packages independantly, via binary-<package> targets.
9
# Uncomment this to turn on verbose mode.
12
# This has to be exported to make some magic below work.
15
3
export DH_ALWAYS_EXCLUDE=CVS:.svn
20
8
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
23
configure: configure-stamp
11
build: export MISSING_BUILD_DEPS := $(shell dpkg-checkbuilddeps 2>&1)
12
binary binary-arch binary-indep build build-arch build-indep clean:
15
ifneq ($(shell dh_listpackages),$(shell dh_listpackages -i)) # arch:any packages are built
16
override_dh_auto_build: debian/build-arch.stamp
18
override_dh_auto_install: install-arch
21
ifneq ($(shell dh_listpackages),$(shell dh_listpackages -a)) # arch:all packages are built
22
ifneq (,$(MISSING_BUILD_DEPS))
23
$(warning $(MISSING_BUILD_DEPS))
24
$(warning Postponing build of architecture independent files until binary or binary-indep target is called)
26
override_dh_auto_build: debian/build-indep.stamp
28
override_dh_auto_install: install-indep
31
override_dh_auto_configure: debian/configure.stamp
33
override_dh_auto_clean:
34
rm -f debian/*.stamp config.log
35
[ ! -f Makefile ] || dh_auto_clean $(DH_AUTO_OPTIONS)
37
override_dh_installchangelogs:
38
dh_installchangelogs -a CHANGES
39
dh_installchangelogs -i
41
override_dh_installinit:
42
dh_installinit --no-start -- start 20 2 3 4 5 .
45
set -ex; for p in $(shell dh_listpackages) ; do sh debian/fix.sh $$p; done
48
debian/configure.stamp:
27
49
dh_auto_configure $(DH_AUTO_OPTIONS) -- \
28
50
--enable-yesterday \
29
51
--disable-man-group \
35
57
LDFLAGS="$(LDFLAGS)"
40
build-arch: build-arch-stamp
41
build-arch-stamp: configure
60
debian/build-arch.stamp: debian/configure.stamp
43
61
dh_auto_build $(DH_AUTO_OPTIONS)
45
chmod a+x debian/debian-sa1
51
build-indep: build-indep-stamp
52
build-indep-stamp: configure
65
debian/build-indep.stamp: debian/configure.stamp
54
66
dh_auto_build $(DH_AUTO_OPTIONS) -- contrib/isag/isag
63
rm -f configure-stamp build-arch-stamp build-indep-stamp config.log
65
[ ! -f Makefile ] || dh_auto_clean $(DH_AUTO_OPTIONS)
70
install-common install-arch install-indep: DH_OPTIONS=
77
install-arch: build-arch install-common
69
install-arch: debian/build-arch.stamp
79
70
dh_auto_install $(DH_AUTO_OPTIONS) --destdir="$(DESTDIR)"
81
72
mkdir -p -m 755 $(DESTDIR)/usr/lib/sysstat
82
73
mv $(DESTDIR)/usr/bin/sar $(DESTDIR)/usr/bin/sar.sysstat
83
74
mv $(DESTDIR)/usr/share/man/man1/sar.1 $(DESTDIR)/usr/share/man/man1/sar.sysstat.1
84
75
rm -rf $(DESTDIR)/usr/doc
86
dh_installchangelogs -a CHANGES
88
install-indep: build-indep install-common
78
install-indep: debian/build-indep.stamp
90
79
$(MAKE) DESTDIR="$(DESTDIR)" install_isag
92
dh_installchangelogs -i
95
# This single target is used to build all the packages, all at once, or
96
# one at a time. So keep in mind: any options passed to commands here will
97
# affect _all_ packages. Anything you want to only affect one package
98
# should be put in another target, such as the install target.
103
# dh_installchangelogs
108
# dh_installlogrotate
113
dh_installinit --no-start -- start 20 2 3 4 5 .
119
sh debian/fix.sh `dh_listpackages`
136
# Build architecture independant packages using the common target.
137
binary-indep: build-indep install-indep
138
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
140
# Build architecture dependant packages using the common target.
141
binary-arch: build-arch install-arch
142
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
144
# Any other binary targets build just one binary package at a time.
145
binary-%: build install
146
make -f debian/rules binary-common DH_OPTIONS=-p$*
148
binary: binary-indep binary-arch
149
build: build-indep build-arch
151
.PHONY: configure clean \
152
build-indep build-arch build \
153
binary-indep binary-arch binary-common binary \
154
indeall-indep install-arch install-common
156
.DEFAULT_GOAL := binary
82
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean \
83
override_dh_auto_build override_dh_auto_install override_dh_auto_clean \
84
override_dh_auto_configure override_dh_installchangelogs override_dh_installinit \
85
override_dh_compress install-arch install-indep