File: rules

package info (click to toggle)
nagios-snmp-plugins 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,008 kB
  • ctags: 381
  • sloc: perl: 7,178; sh: 309; makefile: 50
file content (72 lines) | stat: -rwxr-xr-x 1,920 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

COMMANDDEFPATH:=/etc/nagios-plugins/config/
NP_DIR:=debian/nagios-snmp-plugins
NP_TEMPLATES:=$(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
NP_LIBEXEC:=/usr/lib/nagios/plugins

plugin_cfgs:=snmp_cpfw snmp_env snmp_int snmp_load snmp_mem snmp_process \
	snmp_storage snmp_vrrp snmp_win

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:

clean:
	dh_testdir
	dh_testroot

	dh_clean
	-rm -f debian/postrm

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# Add here commands to install the package into debian/nagios-snmp-plugins.
	for PLUGINS in plugins/*.pl; \
	do \
		install -D -m 0755 $$PLUGINS $(NP_DIR)$(NP_LIBEXEC)/`basename $$PLUGINS` || exit 1; \
		sed -i "s#/usr/local/icinga/libexec#$(NP_LIBEXEC)#" $(NP_DIR)$(NP_LIBEXEC)/`basename $$PLUGINS` || exit 1; \
	done
	# copying templates them into seperate "template" directories outside of
	# /usr/share/doc for ucf to use.
	install -d $(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
	for c in ${plugin_cfgs}; do \
		cp debian/pluginconfig/$${c}.cfg ${NP_TEMPLATES}; \
	done
	# here the list of config templates are writen to postrm
	sed -e 's/@PLUGINS@/${plugin_cfgs}/' \
		< debian/postrm.in \
		> debian/postrm
	# copy html documentation over
	install -d $(NP_DIR)/usr/share/doc/nagios-snmp-plugins/html/
	cp plugins/doc/* $(NP_DIR)/usr/share/doc/nagios-snmp-plugins/html/

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_link
	dh_compress
	dh_fixperms
	dh_perl
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do for now.

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install