summaryrefslogtreecommitdiff
path: root/net-mgmt/icinga-core/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/icinga-core/files')
-rw-r--r--net-mgmt/icinga-core/files/icinga.in141
-rw-r--r--net-mgmt/icinga-core/files/ido2db.in37
-rw-r--r--net-mgmt/icinga-core/files/patch-Makefile.in331
-rw-r--r--net-mgmt/icinga-core/files/patch-include_config.h.in16
-rw-r--r--net-mgmt/icinga-core/files/patch-module-idoutils-Makefile.in40
-rw-r--r--net-mgmt/icinga-core/files/pkg-message.in13
6 files changed, 578 insertions, 0 deletions
diff --git a/net-mgmt/icinga-core/files/icinga.in b/net-mgmt/icinga-core/files/icinga.in
new file mode 100644
index 000000000000..d7ccf2cc5d77
--- /dev/null
+++ b/net-mgmt/icinga-core/files/icinga.in
@@ -0,0 +1,141 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: icinga
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable icinga:
+# icinga_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable icinga.
+# icinga_precache (bool): Set to "NO" by default.
+# Set it to "YES" to enable pre-caching.
+# icinga_flags (str): Set to "" by default.
+# icinga_configfile (str): Set to "%%PREFIX%%/etc/icinga/icinga.cfg" by default.
+#
+
+. /etc/rc.subr
+
+name="icinga"
+rcvar=icinga_enable
+
+load_rc_config "${name}"
+
+: ${icinga_enable:="NO"}
+: ${icinga_configfile="%%PREFIX%%/etc/icinga/icinga.cfg"}
+: ${icinga_precache:="NO"}
+
+command="%%PREFIX%%/bin/icinga"
+command_args="-d"
+extra_commands="reload checkconfig configtest"
+icinga_user="%%ICINGAUSER%%"
+icinga_group="%%ICINGAGROUP%%"
+
+icinga_dir="%%ICINGADIR%%"
+icinga_logdir="%%ICINGALOGDIR%%"
+
+pidfile="${icinga_dir}/icinga.lock"
+icinga_logfile="${icinga_logdir}/${name}.log"
+icinga_statusfile="${icinga_dir}/status.sav"
+icinga_cmdfile="${icinga_dir}/rw/${name}.cmd"
+
+start_cmd="start_cmd"
+checkconfig_cmd="icinga_checkconfig verbose"
+configtest_cmd="${checkconfig_cmd}"
+start_precmd="start_precmd"
+stop_postcmd="stop_postcmd"
+restart_precmd="icinga_checkconfig"
+reload_precmd="reload_precmd"
+sig_reload=HUP
+
+required_files="${icinga_configfile}"
+command_args="${command_args} ${icinga_configfile}"
+
+icinga_cacheconfig() {
+ if ! checkyesno icinga_precache; then
+ return 0
+ fi
+
+ echo -n "Pre-Caching icinga configuration: "
+ ${command} -pv ${icinga_configfile} 2>&1 >/dev/null
+ if [ $? != 0 ]; then
+ echo "FAILED"
+ ${command} -v ${icinga_configfile}
+ return 1
+ else
+ command_args="-u -x ${command_args}"
+ echo "OK"
+ fi
+}
+
+icinga_checkconfig() {
+ echo -n "Performing sanity check of icinga configuration: "
+
+ if [ "$1" != "verbose" ]; then
+ ${command} -v ${icinga_configfile} 2>&1 >/dev/null
+ else
+ ${command} -v ${icinga_configfile}
+ fi
+
+
+ if [ $? != 0 ]; then
+ echo "FAILED"
+ ${command} -v ${icinga_configfile}
+ return 1
+ else
+ echo "OK"
+ fi
+}
+
+reload_precmd() {
+ if ! icinga_checkconfig; then
+ return 1
+ fi
+
+ if ! icinga_cacheconfig; then
+ return 1
+ fi
+}
+
+start_precmd() {
+ for d in "${icinga_dir}" \
+ "${icinga_dir}/checkresults" \
+ "${icinga_logdir}" \
+ "${icinga_logdir}/archives"; do
+ if [ ! -d "${d}" ]; then
+ install -d -o "${icinga_user}" -g "${icinga_group}" "${d}"
+ fi
+ done
+
+ if [ ! -d "${icingadir}/rw" ]; then
+ install -d -o "${icinga_user}" -g "%%WWWGRP%%" "${icinga_dir}"/rw
+ fi
+
+ if ! icinga_checkconfig; then
+ return 1
+ fi
+
+ if ! icinga_cacheconfig; then
+ return 1
+ fi
+
+ if [ ! -f "${icinga_logfile}" ]; then
+ install -o "${icinga_user}" -g "${icinga_group}" -m 644 /dev/null "${icinga_logfile}"
+ fi
+ if [ ! -f "${icinga_statusfile}" ]; then
+ install -o "${icinga_user}" -g "${icinga_group}" -m 644 /dev/null "${icinga_statusfile}"
+ fi
+ rm -f "${icinga_cmdfile}"
+}
+
+stop_postcmd() {
+ rm -f "${icinga_dir}/icinga.tmp" "${icinga_cmdfile}"
+}
+
+start_cmd() {
+ ${command} ${command_args}
+}
+
+run_rc_command "$1"
diff --git a/net-mgmt/icinga-core/files/ido2db.in b/net-mgmt/icinga-core/files/ido2db.in
new file mode 100644
index 000000000000..745139884c4c
--- /dev/null
+++ b/net-mgmt/icinga-core/files/ido2db.in
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: ido2db
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable ido2db:
+# ido2db_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable ido2db.
+# ido2db_configfile (str): Set to "%%PREFIX%%/etc/icinga/ido2db.cfg" by default.
+
+. /etc/rc.subr
+
+name="ido2db"
+rcvar=ido2db_enable
+
+load_rc_config "${name}"
+
+: ${ido2db_enable:="NO"}
+: ${ido2db_configfile="%%PREFIX%%/etc/icinga/ido2db.cfg"}
+
+command="%%PREFIX%%/bin/${name}"
+command_args="-c"
+
+start_cmd="start_cmd"
+
+required_files="${ido2db_configfile}"
+command_args="${command_args} ${ido2db_configfile}"
+
+start_cmd() {
+ ${command} ${command_args}
+}
+
+run_rc_command "$1"
diff --git a/net-mgmt/icinga-core/files/patch-Makefile.in b/net-mgmt/icinga-core/files/patch-Makefile.in
new file mode 100644
index 000000000000..3e6793c368cc
--- /dev/null
+++ b/net-mgmt/icinga-core/files/patch-Makefile.in
@@ -0,0 +1,331 @@
+--- Makefile.in.orig 2015-07-15 13:04:09.000000000 +0200
++++ Makefile.in 2015-07-26 16:58:19.208026000 +0200
+@@ -139,16 +139,16 @@ none:
+ ###############################
+
+ all:
+- cd $(SRC_BASE) && $(MAKE)
+- cd $(SRC_CGI) && $(MAKE)
+- cd $(SRC_HTM) && $(MAKE)
++ $(MAKE) -C $(SRC_BASE)
++ $(MAKE) -C $(SRC_CGI)
++ $(MAKE) -C $(SRC_HTM)
+
+ if [ x$(USE_EVENTBROKER) = xyes ]; then \
+- cd $(SRC_MODULE) && $(MAKE); \
++ $(MAKE) -C $(SRC_MODULE); \
+ fi
+
+ @if [ x$(USE_IDOUTILS) = xyes ]; then \
+- cd $(SRC_IDOUTILS) && $(MAKE); \
++ $(MAKE) -C $(SRC_IDOUTILS); \
+ fi
+
+ @echo ""
+@@ -216,7 +216,7 @@ all:
+ @echo ""
+
+ icinga:
+- cd $(SRC_BASE) && $(MAKE)
++ $(MAKE) -C $(SRC_BASE)
+
+ config:
+ @echo "Sample config files are automatically generated once you run the"
+@@ -224,11 +224,11 @@ config:
+ @echo "system by using the 'make install-config' command."
+
+ cgis:
+- cd $(SRC_CGI) && $(MAKE)
++ $(MAKE) -C $(SRC_CGI)
+
+ idoutils:
+ @if [ x$(USE_IDOUTILS) = xyes ]; then \
+- cd $(SRC_IDOUTILS) && $(MAKE); \
++ $(MAKE) -C $(SRC_IDOUTILS); \
+ else \
+ echo "" ;\
+ echo "Sorry, IDOUtils not enabled!" ;\
+@@ -237,13 +237,13 @@ idoutils:
+ fi
+
+ html:
+- cd $(SRC_HTM) && $(MAKE)
++ $(MAKE) -C $(SRC_HTM)
+
+ contrib:
+- cd $(SRC_CONTRIB) && $(MAKE)
++ $(MAKE) -C $(SRC_CONTRIB)
+
+ modules:
+- cd $(SRC_MODULE) && $(MAKE)
++ $(MAKE) -C $(SRC_MODULE)
+
+ classicui-standalone: cgis
+
+@@ -257,31 +257,31 @@ classicui-standalone: cgis
+ ###############################
+
+ clean:
+- cd $(SRC_BASE) && $(MAKE) $@
+- cd $(SRC_CGI) && $(MAKE) $@
+- cd $(SRC_COMMON) && $(MAKE) $@
+- cd $(SRC_XDATA) && $(MAKE) $@
+- cd $(SRC_HTM) && $(MAKE) $@
+- cd $(SRC_INCLUDE) && $(MAKE) $@
+- cd $(SRC_CONTRIB) && $(MAKE) $@
+- cd $(SRC_MODULE) && $(MAKE) $@
+- cd $(SRC_IDOUTILS) && $(MAKE) $@
+- cd $(SRC_T) && $(MAKE) $@
++ $(MAKE) -C $(SRC_BASE) $@
++ $(MAKE) -C $(SRC_CGI) $@
++ $(MAKE) -C $(SRC_COMMON) $@
++ $(MAKE) -C $(SRC_XDATA) $@
++ $(MAKE) -C $(SRC_HTM) $@
++ $(MAKE) -C $(SRC_INCLUDE) $@
++ $(MAKE) -C $(SRC_CONTRIB) $@
++ $(MAKE) -C $(SRC_MODULE) $@
++ $(MAKE) -C $(SRC_IDOUTILS) $@
++ $(MAKE) -C $(SRC_T) $@
+
+ rm -f *.cfg core
+ rm -f *~ *.*~ */*~ */*.*~ */*/*.*~
+
+ distclean: clean
+- cd $(SRC_BASE) && $(MAKE) $@
+- cd $(SRC_CGI) && $(MAKE) $@
+- cd $(SRC_COMMON) && $(MAKE) $@
+- cd $(SRC_XDATA) && $(MAKE) $@
+- cd $(SRC_HTM) && $(MAKE) $@
+- cd $(SRC_INCLUDE) && $(MAKE) $@
+- cd $(SRC_CONTRIB) && $(MAKE) $@
+- cd $(SRC_MODULE) && $(MAKE) $@
+- cd $(SRC_IDOUTILS) && $(MAKE) $@
+- cd $(SRC_T) && $(MAKE) $@
++ $(MAKE) -C $(SRC_BASE) $@
++ $(MAKE) -C $(SRC_CGI) $@
++ $(MAKE) -C $(SRC_COMMON) $@
++ $(MAKE) -C $(SRC_XDATA) $@
++ $(MAKE) -C $(SRC_HTM) $@
++ $(MAKE) -C $(SRC_INCLUDE) $@
++ $(MAKE) -C $(SRC_CONTRIB) $@
++ $(MAKE) -C $(SRC_MODULE) $@
++ $(MAKE) -C $(SRC_IDOUTILS) $@
++ $(MAKE) -C $(SRC_T) $@
+
+ rm -f sample-config/*.cfg sample-config/*.conf sample-config/template-object/*.cfg sample-config/modules/*.cfg
+ rm -f daemon-init pkginfo rc.ido2db ido2db-systemd icinga-systemd sysconfig-env
+@@ -301,7 +301,7 @@ test:
+ $(MAKE) test-perl
+
+ test-perl: icinga cgis
+- cd t && $(MAKE) test
++ $(MAKE) -C t test
+
+ ###############################
+ # Package
+@@ -315,8 +315,8 @@ create-docs: copy-docs-style
+ #${MAKE} submodule-init
+ #${MAKE} submodule-update
+ #${MAKE} submodule-update-latest
+- cd ${SRC_DOCBOOK_EN} && make en
+- cd ${SRC_DOCBOOK_DE} && make de
++ $(MAKE) -C ${SRC_DOCBOOK_EN} en
++ $(MAKE) -C ${SRC_DOCBOOK_DE} de
+ cp ${SRC_DOCBOOK_IMAGES}/*.png ${SRC_DOCS_IMAGES}/
+ @echo "updated docs :)"
+
+@@ -349,37 +349,32 @@ submodule-update-latest:
+
+
+ install-html:
+- cd $(SRC_HTM) && $(MAKE) install
++ $(MAKE) -C $(SRC_HTM) install
+
+ install-dev-docu:
+- cd $(SRC_HTM) && $(MAKE) install-dev-docu
++ $(MAKE) -C $(SRC_HTM) install-dev-docu
+
+ install-base:
+- cd $(SRC_BASE) && $(MAKE) install
++ $(MAKE) -C $(SRC_BASE) install
+
+ install-cgis:
+- cd $(SRC_CGI) && $(MAKE) install
++ $(MAKE) -C $(SRC_CGI) install
+
+ install:
+- cd $(SRC_BASE) && $(MAKE) $@
+- cd $(SRC_CGI) && $(MAKE) $@
+- cd $(SRC_HTM) && $(MAKE) $@
++ $(MAKE) -C $(SRC_BASE) $@
++ $(MAKE) -C $(SRC_CGI) $@
++ $(MAKE) -C $(SRC_HTM) $@
+
+ $(MAKE) install-basic
+
+ install-unstripped:
+- cd $(SRC_BASE) && $(MAKE) $@
+- cd $(SRC_CGI) && $(MAKE) $@
+- cd $(SRC_HTM) && $(MAKE) $@
++ $(MAKE) -C $(SRC_BASE) $@
++ $(MAKE) -C $(SRC_CGI) $@
++ $(MAKE) -C $(SRC_HTM) $@
+
+ $(MAKE) install-basic
+
+ install-basic:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(STATEDIR)
+- $(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)
+ if [ $(INSTALLPERLSTUFF) = yes ]; then \
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(P1FILELOC); \
+ $(INSTALL) -m 664 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(P1FILELOC); \
+@@ -424,32 +419,31 @@ install-basic:
+ @echo ""
+
+ install-cgiconf:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
+- $(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-config: install-cgiconf
+- $(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/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
+- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/modules/livestatus.cfg $(DESTDIR)$(CFGDIR)/modules/livestatus.cfg
+- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/modules/mod_gearman.cfg $(DESTDIR)$(CFGDIR)/modules/mod_gearman.cfg
+- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/modules/pnp4nagios.cfg $(DESTDIR)$(CFGDIR)/modules/pnp4nagios.cfg
+- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/modules/flapjack.cfg $(DESTDIR)$(CFGDIR)/modules/flapjack.cfg
+-
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/cgiauth.cfg $(DESTDIR)$(CFGDIR)/cgiauth.cfg.sample
++
++
++install-config:
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/conf.d
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/modules
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg.sample
++ $(INSTALL) -b -m 640 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/notifications.cfg $(DESTDIR)$(CFGDIR)/objects/notifications.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/modules/livestatus.cfg $(DESTDIR)$(CFGDIR)/modules/livestatus.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/modules/mod_gearman.cfg $(DESTDIR)$(CFGDIR)/modules/mod_gearman.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/modules/pnp4nagios.cfg $(DESTDIR)$(CFGDIR)/modules/pnp4nagios.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/modules/flapjack.cfg $(DESTDIR)$(CFGDIR)/modules/flapjack.cfg.sample
+ @echo ""
+ @echo "*** Config files installed ***"
+ @echo ""
+@@ -465,8 +459,8 @@ install-testconfig:
+
+
+ install-webconf:
+- $(MKDIR) -p -m 775 $(DESTDIR)$(HTTPD_CONF)
+- $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/httpd.conf $(DESTDIR)$(HTTPDCONFFILE)
++ $(MKDIR) -p -m 755 $(DESTDIR)$(HTTPD_CONF)
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/httpd.conf $(DESTDIR)$(HTTPDCONFFILE).sample
+ @if [ x$(APACHE24_DEBIAN) = xyes ]; then \
+ echo " Debian Apache 2.4 detected. " ;\
+ echo " Run 'a2enconf icinga' and 'service apache2 reload'" ;\
+@@ -478,8 +472,8 @@ install-webconf:
+
+ install-webconf-auth:
+
+- $(MKDIR) -p -m 775 $(DESTDIR)$(HTTPD_CONF)
+- $(INSTALL) -b -m 644 $(INSTALL_OPTS) icinga.htpasswd $(DESTDIR)$(HTTPAUTHFILE)
++ $(MKDIR) -p -m 755 $(DESTDIR)$(HTTPD_CONF)
++ $(INSTALL) -b -m 640 $(INSTALL_OPTS) icinga.htpasswd $(DESTDIR)$(HTTPAUTHFILE).sample
+
+ @echo ""
+ @echo "*** Icinga http auth file installed ***"
+@@ -488,7 +482,7 @@ install-webconf-auth:
+
+ install-idoutils:
+ @if [ x$(USE_IDOUTILS) = xyes ]; then \
+- cd $(SRC_IDOUTILS) && $(MAKE) $@ ;\
++ $(MAKE) -C $(SRC_IDOUTILS) $@ ;\
+ fi
+ @if [ x$(USE_IDOUTILS) = xyes ]; then \
+ echo "" ;\
+@@ -537,27 +531,27 @@ install-commandmode:
+ @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
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR)
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/submit_check_result $(DESTDIR)$(EVENTHANDLERDIR)/submit_check_result
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/disable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/disable_active_service_checks
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/enable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/enable_active_service_checks
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/disable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/disable_notifications
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/enable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/enable_notifications
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/obsessive_svc_handler
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/submit_check_result_via_nsca
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/redundancy-scenario1/handle-master-host-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-host-event
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-proc-event
+
+ @echo ""
+ @echo "*** Sample Eventhandlers installed ***"
+ @echo ""
+
+ install-downtimes:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(DOWNTIMESDIR)
+- $(INSTALL) -b -m 774 $(INSTALL_OPTS) tools/downtimes/sched_down.pl $(DESTDIR)$(DOWNTIMESDIR)/sched_down.pl
+- $(INSTALL) -b -m 774 $(INSTALL_OPTS) tools/downtimes/sched_conv.pl $(DESTDIR)$(DOWNTIMESDIR)/sched_conv.pl
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DOWNTIMESDIR)
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) tools/downtimes/sched_down.pl $(DESTDIR)$(DOWNTIMESDIR)/sched_down.pl
++ $(INSTALL) -b -m 744 $(INSTALL_OPTS) tools/downtimes/sched_conv.pl $(DESTDIR)$(DOWNTIMESDIR)/sched_conv.pl
+
+ @echo ""
+ @echo "*** Recurring downtimes scripts installed ***"
+@@ -572,10 +566,10 @@ install-classicui-standalone-conf: insta
+ install-classicui-standalone: install-cgis install-html
+
+ # make sure we keep all the needed dirs for data
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(STATEDIR)
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives
+- $(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(EXTCMDFILEDIR)
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(STATEDIR)
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)
++ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives
++ $(INSTALL) -m 755 $(COMMAND_OPTS) -d $(DESTDIR)$(EXTCMDFILEDIR)
+
+ @echo ""
+ @echo "*** Icinga Classic UI Standalone installed. ***"
diff --git a/net-mgmt/icinga-core/files/patch-include_config.h.in b/net-mgmt/icinga-core/files/patch-include_config.h.in
new file mode 100644
index 000000000000..e98a7c130c9a
--- /dev/null
+++ b/net-mgmt/icinga-core/files/patch-include_config.h.in
@@ -0,0 +1,16 @@
+--- include/config.h.in.orig 2015-07-15 13:04:09.000000000 +0200
++++ include/config.h.in 2015-07-25 16:05:16.168060000 +0200
+@@ -217,10 +217,13 @@
+ #include <errno.h>
+ #endif
+
++/* remove inclusion of sys/timeb.h to suppress a lot of warnings during build */
++#if 0
+ #undef HAVE_SYS_TIMEB_H
+ #if HAVE_SYS_TIMEB_H
+ #include <sys/timeb.h>
+ #endif
++#endif
+
+ #undef HAVE_SYS_IPC_H
+ #ifdef HAVE_SYS_IPC_H
diff --git a/net-mgmt/icinga-core/files/patch-module-idoutils-Makefile.in b/net-mgmt/icinga-core/files/patch-module-idoutils-Makefile.in
new file mode 100644
index 000000000000..8ab159eb4457
--- /dev/null
+++ b/net-mgmt/icinga-core/files/patch-module-idoutils-Makefile.in
@@ -0,0 +1,40 @@
+--- module/idoutils/Makefile.in.orig 2015-03-30 10:38:53.000000000 +0200
++++ module/idoutils/Makefile.in 2015-03-30 23:20:17.394563000 +0200
+@@ -32,16 +32,16 @@ endif
+
+ all:
+ if [ x$(USE_IDOUTILS) = xyes ]; then \
+- cd $(SRC_BASE) && $(MAKE); \
++ $(MAKE) -C $(SRC_BASE); \
+ fi;
+
+ clean:
+- cd $(SRC_BASE) && $(MAKE) $@
++ $(MAKE) -C $(SRC_BASE) $@
+ rm -f core
+ rm -f *~ */*~
+
+ distclean: clean
+- cd $(SRC_BASE) && $(MAKE) $@
++ $(MAKE) -C $(SRC_BASE) $@
+ rm -f config.log config.status config.cache $(SRC_INCLUDE)/config.h
+ rm -f Makefile
+ rm -f init-script.suse subst
+@@ -53,12 +53,12 @@ devclean: distclean
+ install-idoutils: install
+
+ install:
+- cd $(SRC_BASE) && $(MAKE) $@
++ $(MAKE) -C $(SRC_BASE) $@
+ $(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)/modules
+- $(INSTALL) -b -m 664 $(INSTALL_OPTS) config/ido2db.cfg-sample $(DESTDIR)$(CFGDIR)
+- $(INSTALL) -b -m 664 $(INSTALL_OPTS) config/idomod.cfg-sample $(DESTDIR)$(CFGDIR)
+- $(INSTALL) -b -m 664 $(INSTALL_OPTS) config/idoutils.cfg-sample $(DESTDIR)$(CFGDIR)/modules
+- $(INSTALL) -b -m 664 $(INSTALL_OPTS) config/ido2db_check_proc.cfg $(DESTDIR)$(CFGDIR)/objects/ido2db_check_proc.cfg
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) config/ido2db.cfg-sample $(DESTDIR)$(CFGDIR)/ido2db.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) config/idomod.cfg-sample $(DESTDIR)$(CFGDIR)/idomod.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) config/idoutils.cfg-sample $(DESTDIR)$(CFGDIR)/modules/idoutils.cfg.sample
++ $(INSTALL) -b -m 644 $(INSTALL_OPTS) config/ido2db_check_proc.cfg $(DESTDIR)$(CFGDIR)/objects/ido2db_check_proc.cfg.sample
+
diff --git a/net-mgmt/icinga-core/files/pkg-message.in b/net-mgmt/icinga-core/files/pkg-message.in
new file mode 100644
index 000000000000..338e020d815d
--- /dev/null
+++ b/net-mgmt/icinga-core/files/pkg-message.in
@@ -0,0 +1,13 @@
+*************************************************************************
+
+ Enable Icinga in /etc/rc.conf with the following line:
+
+ icinga_enable="YES"
+
+ If you like to use database backend with IDOutils the SQL scripts to
+ setup the database have been installed in
+ %%PREFIX%%/%%EXAMPLESDIR%%/idoutils/db/.
+ You also need to install databases/libdbi-drivers to connect to a
+ database.
+
+*************************************************************************