3
# Uncomment this to turn on verbose mode.
6
COMMANDDEFPATH:=/etc/nagios-plugins/config/
7
NP_DIR:=debian/nagios-snmp-plugins
8
NP_TEMPLATES:=$(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
9
NP_LIBEXEC:=/usr/lib/nagios/plugins
11
plugin_cfgs:=snmp_cpfw snmp_env snmp_int snmp_load snmp_mem snmp_process \
12
snmp_storage snmp_vrrp snmp_win
29
# Add here commands to install the package into debian/nagios-snmp-plugins.
30
for PLUGINS in *.pl; \
32
install -D -m 0755 $$PLUGINS $(NP_DIR)$(NP_LIBEXEC)/$$PLUGINS || exit 1; \
33
sed -i "s#/usr/local/nagios/libexec#$(NP_LIBEXEC)#" $(NP_DIR)$(NP_LIBEXEC)/$$PLUGINS || exit 1; \
35
# copying templates them into seperate "template" directories outside of
36
# /usr/share/doc for ucf to use.
37
install -d $(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
38
for c in ${plugin_cfgs}; do \
39
cp debian/pluginconfig/$${c}.cfg ${NP_TEMPLATES}; \
41
# here the list of config templates are writen to postrm
42
sed -e 's/@PLUGINS@/${plugin_cfgs}/' \
45
# copy html documentation over
46
install -d $(NP_DIR)/usr/share/doc/nagios-snmp-plugins/html/
47
cp doc/* $(NP_DIR)/usr/share/doc/nagios-snmp-plugins/html/
49
# Build architecture-independent files here.
50
binary-indep: build install
64
# Build architecture-dependent files here.
65
binary-arch: build install
66
# We have nothing to do for now.
68
binary: binary-indep binary-arch
69
.PHONY: build clean binary-indep binary-arch binary install