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
|
DEB_VERSION := $(shell dpkg-parsechangelog --format rfc822 | grep-dctrl -ensVersion -S .)
%:
dh $@ --with autoreconf
override_dh_auto_build:
make all
override_dh_auto_clean:
[ -e "Makefile" ] && make clean || true
rm -f debian/check_multi.8 plugins/t/testopts.pm
override_dh_auto_configure:
dh_auto_configure -- \
--libexecdir=/usr/lib/nagios/plugins \
--localstatedir=/var/lib/icinga \
--with-image_path=/icinga/images \
--with-objects_cache=/var/cache/icinga/objects.cache \
--with-plugin_path=/usr/lib/nagios/plugins \
--with-status_dat=/var/lib/icinga/status.dat
override_dh_auto_install:
make install DESTDIR=$(CURDIR)/debian/nagios-plugin-check-multi
make install-config DESTDIR=$(CURDIR)/debian/nagios-plugin-check-multi \
CFGDIR=/usr/share/doc/nagios-plugin-check-multi/examples
find $(CURDIR)/debian/nagios-plugin-check-multi/usr/share/doc/nagios-plugin-check-multi/examples \
-type f -print0 | xargs -0 -r chmod 644
help2man --no-info --section=8 --version-string="check_multi $(DEB_VERSION)" \
-n "nagios plugin to combine multiple service checks in one run" \
$(CURDIR)/debian/nagios-plugin-check-multi/usr/lib/nagios/plugins/check_multi \
> $(CURDIR)/debian/check_multi.8
|