~ubuntu-branches/ubuntu/raring/sysstat/raring

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2011-03-23 13:26:07 UTC
  • mfrom: (1.1.20 upstream) (2.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20110323132607-huhxd19s8ts5muq7
Tags: 10.0.0-1
* New upstream (stable) release:
  + Don't link sysstat's commands with sensors library if not
    needed (closes: #612571).
  + [Adam Heath]: iostat incorrectly mapped device-mapper IDs
    greater than 256. This is now fixed (closes: #614397).
* debian/rules: switch to using dh command.
* Remove 07-remove_fdatasync.patch, no longer needed. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
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.
5
 
#
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.
8
 
 
9
 
# Uncomment this to turn on verbose mode.
10
 
# export DH_VERBOSE=1
11
 
 
12
 
# This has to be exported to make some magic below work.
13
 
export DH_OPTIONS
14
2
 
15
3
export DH_ALWAYS_EXCLUDE=CVS:.svn
16
4
 
20
8
LDFLAGS         := $(shell dpkg-buildflags --get LDFLAGS)
21
9
 
22
10
 
23
 
configure: configure-stamp
24
 
configure-stamp:
25
 
        dh_testdir
26
 
 
 
11
build: export MISSING_BUILD_DEPS := $(shell dpkg-checkbuilddeps 2>&1)
 
12
binary binary-arch binary-indep build build-arch build-indep clean:
 
13
        dh ${@}
 
14
 
 
15
ifneq ($(shell dh_listpackages),$(shell dh_listpackages -i))  # arch:any packages are built
 
16
override_dh_auto_build:   debian/build-arch.stamp
 
17
 
 
18
override_dh_auto_install: install-arch
 
19
endif
 
20
 
 
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)
 
25
  else
 
26
override_dh_auto_build:   debian/build-indep.stamp
 
27
  endif
 
28
override_dh_auto_install: install-indep
 
29
endif
 
30
 
 
31
override_dh_auto_configure: debian/configure.stamp
 
32
 
 
33
override_dh_auto_clean:
 
34
        rm -f debian/*.stamp config.log
 
35
        [ ! -f Makefile ] || dh_auto_clean $(DH_AUTO_OPTIONS)
 
36
 
 
37
override_dh_installchangelogs:
 
38
        dh_installchangelogs -a CHANGES
 
39
        dh_installchangelogs -i
 
40
 
 
41
override_dh_installinit:
 
42
        dh_installinit --no-start -- start 20 2 3 4 5 .
 
43
 
 
44
override_dh_compress:
 
45
        set -ex; for p in $(shell dh_listpackages) ; do sh debian/fix.sh $$p; done
 
46
        dh_compress
 
47
 
 
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)"
36
58
        touch "$@"
37
59
 
38
 
 
39
 
 
40
 
build-arch: build-arch-stamp
41
 
build-arch-stamp: configure
42
 
 
 
60
debian/build-arch.stamp: debian/configure.stamp
43
61
        dh_auto_build $(DH_AUTO_OPTIONS)
44
 
 
45
 
        chmod a+x debian/debian-sa1
46
 
 
47
62
        touch "$@"
48
63
 
49
64
 
50
 
 
51
 
build-indep: build-indep-stamp
52
 
build-indep-stamp: configure
53
 
 
 
65
debian/build-indep.stamp: debian/configure.stamp
54
66
        dh_auto_build $(DH_AUTO_OPTIONS) -- contrib/isag/isag
55
 
 
56
67
        touch "$@"
57
68
 
58
 
 
59
 
 
60
 
clean:
61
 
        dh_testdir
62
 
        dh_testroot
63
 
        rm -f configure-stamp build-arch-stamp build-indep-stamp config.log
64
 
 
65
 
        [ ! -f Makefile ] || dh_auto_clean $(DH_AUTO_OPTIONS)
66
 
 
67
 
        dh_clean
68
 
 
69
 
 
70
 
install-common install-arch install-indep: DH_OPTIONS=
71
 
install-common:
72
 
        dh_testdir
73
 
        dh_testroot
74
 
        dh_prep
75
 
        dh_installdirs
76
 
 
77
 
install-arch: build-arch install-common
78
 
 
 
69
install-arch: debian/build-arch.stamp
79
70
        dh_auto_install $(DH_AUTO_OPTIONS) --destdir="$(DESTDIR)"
80
 
 
 
71
        
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
85
76
 
86
 
        dh_installchangelogs -a CHANGES
87
 
 
88
 
install-indep: build-indep install-common
89
 
 
 
77
 
 
78
install-indep: debian/build-indep.stamp
90
79
        $(MAKE) DESTDIR="$(DESTDIR)" install_isag
91
80
 
92
 
        dh_installchangelogs -i
93
 
 
94
 
 
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.
99
 
binary-common:
100
 
        dh_testdir
101
 
        dh_testroot
102
 
        dh_install
103
 
#       dh_installchangelogs
104
 
        dh_installdocs
105
 
        dh_installexamples
106
 
        dh_installmenu
107
 
        dh_installdebconf
108
 
#       dh_installlogrotate
109
 
#       dh_installemacsen
110
 
#       dh_installcatalogs
111
 
#       dh_installpam
112
 
#       dh_installmime
113
 
        dh_installinit --no-start -- start 20 2 3 4 5 .
114
 
#       dh_installman
115
 
        dh_installcron
116
 
#       dh_installinfo
117
 
#       dh_undocumented
118
 
 
119
 
        sh debian/fix.sh `dh_listpackages`
120
 
 
121
 
        dh_lintian
122
 
        dh_strip
123
 
        dh_link
124
 
        dh_compress
125
 
        dh_fixperms
126
 
#       dh_perl
127
 
#       dh_python
128
 
#       dh_makeshlibs
129
 
        dh_installdeb
130
 
        dh_shlibdeps
131
 
        dh_gencontrol
132
 
        dh_md5sums
133
 
        dh_builddeb
134
 
 
135
 
 
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
139
 
 
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
143
 
 
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$*
147
 
 
148
 
binary: binary-indep binary-arch
149
 
build:  build-indep  build-arch
150
 
 
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
155
 
 
156
 
.DEFAULT_GOAL := binary
 
81
 
 
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