pkgsrc/net/icinga-base/patches/patch-Makefile.in
ryoon f470163348 Import icinga-base-1.8.4 as net/icinga-base.
Icinga is a program that will monitor hosts and services on your
network.  It has the ability to email or page you when a problem arises
and when it gets resolved.  Icinga is written in C and is designed to
run under Linux, although it should work under most other *NIX variants.
It can run either as a normal process or as a daemon, intermittently
running checks on various services that you specify.  The actual service
checks are performed by external "plugins" which return service
information to Icinga.  Several CGI programs are included with Icinga
in order to allow you to view the current service status, history, etc.
via a web browser.

This package provides the core Icinga infrastructure and web pages.

Icinga is a fork of Nagios (net/nagios-base) and Icinga uses
Nagios's plugins (net/nagios-plugins).
2013-03-02 04:08:27 +00:00

173 lines
10 KiB
Text

$NetBSD: patch-Makefile.in,v 1.1 2013/03/02 04:08:27 ryoon Exp $
--- Makefile.in.orig 2013-01-13 22:18:37.000000000 +0000
+++ Makefile.in
@@ -38,7 +38,7 @@ CHECKRESULTDIR=@CHECKRESULTDIR@
EXTCMDFILEDIR=@EXTCMDFILEDIR@
EVENTHANDLERDIR=@EVENTHANDLERDIR@
P1FILELOC=@P1FILELOC@
-CFGDIR=@sysconfdir@
+CFGDIR=@prefix@/share/examples/icinga
BINDIR=@bindir@
LIBDIR=@libdir@
CGIDIR=@sbindir@
@@ -368,13 +368,13 @@ install-unstripped:
$(MAKE) install-basic
install-basic:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CHECKRESULTDIR)
+ ${BSD_INSTALL_LIB_DIR} $(DESTDIR)$(LIBEXECDIR)
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(LOGDIR)
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(LOGDIR)/archives
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(CHECKRESULTDIR)
if [ $(INSTALLPERLSTUFF) = yes ]; then \
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(P1FILELOC); \
- $(INSTALL) -m 664 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(P1FILELOC); \
+ ${BSD_INSTALL_SCRIPT_DIR} $(DESTDIR)$(P1FILELOC); \
+ ${BSD_INSTALL_SCRIPT} p1.pl $(DESTDIR)$(P1FILELOC); \
fi;
@echo ""
@@ -411,23 +411,23 @@ install-basic:
install-config:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/conf.d
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/modules
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg
- $(INSTALL) -b -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgiauth.cfg $(DESTDIR)$(CFGDIR)/cgiauth.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/notifications.cfg $(DESTDIR)$(CFGDIR)/objects/notifications.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(CFGDIR)
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(CFGDIR)/objects
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(CFGDIR)/conf.d
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(CFGDIR)/modules
+ ${BSD_INSTALL_DATA} sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg
+ ${BSD_INSTALL_DATA} sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg
+ ${BSD_INSTALL_DATA} sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg
+ ${BSD_INSTALL_DATA} sample-config/cgiauth.cfg $(DESTDIR)$(CFGDIR)/cgiauth.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/notifications.cfg $(DESTDIR)$(CFGDIR)/objects/notifications.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg
+ ${BSD_INSTALL_DATA} sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg
@echo ""
@echo "*** Config files installed ***"
@@ -438,14 +438,14 @@ install-config:
@echo ""
install-testconfig:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/tests
+ ${BSD_INSTALL_DATA} $(DESTDIR)$(CFGDIR)/tests
for file in tests/etc/*.cfg; \
- do $(INSTALL) -b -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(CFGDIR)/tests; done
+ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(CFGDIR)/tests; done
install-webconf:
- $(MKDIR) -p -m 775 $(DESTDIR)$(HTTPD_CONF)
- $(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/icinga.conf
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTTPD_CONF)
+ ${BSD_INSTALL_DATA} sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/icinga.conf
@echo ""
@echo "*** Icinga/Apache conf file installed ***"
@@ -480,11 +480,11 @@ install-idoutils:
install-init: install-daemoninit
install-daemoninit:
- $(INSTALL) -m 755 -d $(INIT_OPTS) $(DESTDIR)$(INIT_DIR)
- $(INSTALL) -m 755 $(INIT_OPTS) daemon-init $(DESTDIR)$(INIT_DIR)/icinga
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(INIT_DIR)
+ ${BSD_INSTALL_DATA} daemon-init $(DESTDIR)$(INIT_DIR)/icinga
@if [ x$(USE_IDOUTILS) = xyes ]; then \
- $(INSTALL) -m 755 $(INIT_OPTS) rc.ido2db $(DESTDIR)$(INIT_DIR)/ido2db ;\
+ ${BSD_INSTALL_SCRIPT} rc.ido2db $(DESTDIR)$(INIT_DIR)/ido2db ;\
fi
@echo ""
@@ -493,26 +493,26 @@ install-daemoninit:
install-commandmode:
- $(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(EXTCMDFILEDIR)
- chmod g+s $(DESTDIR)$(EXTCMDFILEDIR)
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(EXTCMDFILEDIR)
+ #chmod g+s $(DESTDIR)$(EXTCMDFILEDIR)
@echo ""
@echo "*** External command directory configured ***"
@echo ""
install-eventhandlers:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR)
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/submit_check_result $(DESTDIR)$(EVENTHANDLERDIR)/submit_check_result
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/disable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/disable_active_service_checks
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/enable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/enable_active_service_checks
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/disable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/disable_notifications
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/enable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/enable_notifications
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/obsessive_svc_handler
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/submit_check_result_via_nsca
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/redundancy-scenario1/handle-master-host-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-host-event
- $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-proc-event
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(EVENTHANDLERDIR)
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/submit_check_result $(DESTDIR)$(EVENTHANDLERDIR)/submit_check_result
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/disable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/disable_active_service_checks
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/enable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/enable_active_service_checks
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/disable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/disable_notifications
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/enable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/enable_notifications
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/obsessive_svc_handler
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/submit_check_result_via_nsca
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/redundancy-scenario1/handle-master-host-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-host-event
+ ${BSD_INSTALL_DATA} contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-proc-event
@echo ""
@echo "*** Sample Eventhandlers installed ***"
@@ -553,19 +553,19 @@ Prototype:
cd sample-config; \
for file in *.cfg; \
do \
- $(INSTALL) -m 644 $$file $(PACKDIR)/$(CFGDIR)/$$file.$(VERSION); \
+ ${BSD_INSTALL_DATA} $$file $(PACKDIR)/$(CFGDIR)/$$file.$(VERSION); \
done
chmod 640 $(PACKDIR)/$(CFGDIR)/resource.cfg.$(VERSION)
cd sample-config/template-object; \
for file in *.cfg; \
do \
- $(INSTALL) -m 644 $$file $(PACKDIR)/$(CFGDIR)/objects/$$file.$(VERSION); \
+ ${BSD_INSTALL_DATA} $$file $(PACKDIR)/$(CFGDIR)/objects/$$file.$(VERSION); \
done
mkdir -p $(PACKDIR)/lib/svc/method/
- $(INSTALL) -o root -g bin -m 555 daemon-init $(PACKDIR)/lib/svc/method/icinga
+ ${BSD_INSTALL_SCRIPT} daemon-init $(PACKDIR)/lib/svc/method/icinga
mkdir -p $(PACKDIR)/var/svc/manifest/application/
sed 's%!CFGPREFIX!%$(CFGDIR)%g' solaris/icinga.xml.tpl > solaris/icinga.xml
- $(INSTALL) -m 444 -o root -g root solaris/icinga.xml $(PACKDIR)/var/svc/manifest/application/
+ ${BSD_INSTALL_DATA} solaris/icinga.xml $(PACKDIR)/var/svc/manifest/application/
#cd contrib; $(MAKE) all; $(MAKE) DESTDIR=$(PACKDIR) INIT_OPTS='' INSTALL_OPTS='' COMMAND_OPTS='' icinga_grp='' icinga_usr='' install
echo i pkginfo > solaris/Prototype
if [ -f solaris/checkinstall.in ] ; then cat solaris/checkinstall.in | sed 's/!SUN_PLATFORM!/$(SUN_PLATFORM)/g' > solaris/checkinstall; fi