~ubuntu-branches/ubuntu/hoary/nagios-plugins/hoary

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Guido Trotter
  • Date: 2004-06-15 15:37:48 UTC
  • Revision ID: james.westby@ubuntu.com-20040615153748-qu1p82yghm0o98ct
Tags: 1.3.1.0-7
Add 03_hostwithnumbers.dpatch written by me to correct the behaviour
of is_hostname() in utils.c  about host components beginning with a 
number (closes: #253620). Thanks to Andreas Edler who spotted
the problem.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# -*- makefile -*-
 
3
# Sample debian/rules that uses debhelper.
 
4
# GNU copyright 1997 to 1999 by Joey Hess.
 
5
 
 
6
# Uncomment this to turn on verbose mode.
 
7
#export DH_VERBOSE=1
 
8
 
 
9
PACKAGE = nagios-plugins
 
10
 
 
11
include /usr/share/dpatch/dpatch.make
 
12
 
 
13
# These are used for cross-compiling and for saving the configure script
 
14
# from having to guess our platform (since we know it already)
 
15
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
16
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
17
 
 
18
CFLAGS = -Wall -g
 
19
 
 
20
PATH = /bin:/sbin:/usr/bin:/usr/sbin
 
21
 
 
22
 
 
23
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
24
        CFLAGS += -O0
 
25
else
 
26
        CFLAGS += -O2
 
27
endif
 
28
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
29
        INSTALL_PROGRAM += -s
 
30
endif
 
31
 
 
32
config.status: configure
 
33
        export PATH=$(PATH)
 
34
        dh_testdir
 
35
        # Add here commands to configure the package.
 
36
        CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --libexecdir=/usr/lib/nagios/plugins --with-nagios-user=nagios --with-nagios-group=nagios --with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin --with-df-command="/bin/df -Pk" --with-ping-command='/bin/ping %s -n -c %d'
 
37
 
 
38
build: patch-stamp build-stamp
 
39
 
 
40
build-stamp:  config.status
 
41
        dh_testdir
 
42
 
 
43
        # Add here commands to compile the package.
 
44
        $(MAKE)
 
45
        #/usr/bin/docbook-to-man debian/nagios-plugins.sgml > nagios-plugins.1
 
46
 
 
47
        touch build-stamp
 
48
 
 
49
clean: really-clean unpatch
 
50
 
 
51
really-clean:
 
52
        dh_testdir
 
53
        dh_testroot
 
54
        rm -f build-stamp 
 
55
 
 
56
        # Add here commands to clean up after the build process.
 
57
        -$(MAKE) distclean
 
58
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 
59
        cp -f /usr/share/misc/config.sub config.sub
 
60
endif
 
61
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 
62
        cp -f /usr/share/misc/config.guess config.guess
 
63
endif
 
64
 
 
65
 
 
66
        dh_clean 
 
67
 
 
68
install: build
 
69
        dh_testdir
 
70
        dh_testroot
 
71
        dh_clean -k 
 
72
        dh_installdirs
 
73
 
 
74
        # Add here commands to install the package into debian/nagios-plugins.
 
75
        $(MAKE) install DESTDIR=$(CURDIR)/debian/nagios-plugins
 
76
        cp $(CURDIR)/debian/pluginconfig/* $(CURDIR)/debian/nagios-plugins/etc/nagios-plugins/config/
 
77
 
 
78
 
 
79
# Build architecture-independent files here.
 
80
binary-indep: build install
 
81
# We have nothing to do by default.
 
82
 
 
83
# Build architecture-dependent files here.
 
84
binary-arch: build install
 
85
        dh_testdir
 
86
        dh_testroot
 
87
        dh_installchangelogs ChangeLog
 
88
        dh_installdocs
 
89
        dh_installexamples command.cfg
 
90
#       dh_install
 
91
#       dh_installmenu
 
92
#       dh_installdebconf       
 
93
#       dh_installlogrotate
 
94
#       dh_installemacsen
 
95
#       dh_installpam
 
96
#       dh_installmime
 
97
#       dh_installinit
 
98
#       dh_installcron
 
99
#       dh_installinfo
 
100
        dh_installman
 
101
#       dh_link
 
102
        dh_strip
 
103
        dh_compress
 
104
        dh_fixperms
 
105
#       dh_perl
 
106
#       dh_python
 
107
#       dh_makeshlibs
 
108
        dh_installdeb
 
109
        dh_shlibdeps
 
110
        dh_gencontrol
 
111
        dh_md5sums
 
112
        dh_builddeb
 
113
 
 
114
binary: binary-indep binary-arch
 
115
.PHONY: build clean binary-indep binary-arch binary install