[icinga-checkins] icinga.org: icinga-core/dev/cgis: install: add configure target --with-eventhandler-dir and " make install-eventhandlers" for contrib/eventhandlers #2352

git at icinga.org git at icinga.org
Sat Feb 25 21:20:56 CET 2012


Module: icinga-core
Branch: dev/cgis
Commit: 2d85322a9f3c22a4c6fe94124b093fb12b110d8f
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=2d85322a9f3c22a4c6fe94124b093fb12b110d8f

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sat Feb 25 18:34:48 2012 +0100

install: add configure target --with-eventhandler-dir and "make install-eventhandlers" for contrib/eventhandlers #2352

refs #2352

---

 Changelog    |    5 +++++
 Makefile.in  |   24 +++++++++++++++++++++++-
 configure    |   21 +++++++++++++++++++++
 configure.in |    9 +++++++++
 subst.in     |    1 +
 5 files changed, 59 insertions(+), 1 deletions(-)

diff --git a/Changelog b/Changelog
index 9416403..02d36df 100644
--- a/Changelog
+++ b/Changelog
@@ -33,6 +33,7 @@ ENHANCEMENTS
 * install: introduce "lib/" in default prefix install for modules #2347
 * install: revamp the broker_module entry in icinga.cfg pointing to new module definition #2348
 * install: change idomod extension from .o to .so, make .so the default extension for modules #2354
+* install: add configure target --with-eventhandler-dir and "make install-eventhandlers" for contrib/eventhandlers #2352
 
 * icinga.spec: use --with-plugin-dir instead of --libexexdir for nagios plugins dir #2344
 * icinga.spec: make aware of the change of idomod.o location and changed extension (now .so) #2350
@@ -77,7 +78,11 @@ CHANGES
 
 * install: introduce "lib/" in default prefix install for modules #2347
 
+* install: --with-eventhandler-dir=<path> #2352
+	** sets path to eventhandler directory path i.e. $prefix/libexec/eventhandlers
 
+* install: make install-eventhandlers #2352
+	** install sample eventhandlers to defined location
 
 
 1.6.1 - 02/12/2011
diff --git a/Makefile.in b/Makefile.in
index f58a214..45297ce 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -36,6 +36,7 @@ LOGDIR=@LOGDIR@
 CGILOGDIR=@CGILOGDIR@
 CHECKRESULTDIR=@CHECKRESULTDIR@
 EXTCMDFILEDIR=@EXTCMDFILEDIR@
+EVENTHANDLERDIR=@EVENTHANDLERDIR@
 P1FILELOC=@P1FILELOC@
 CFGDIR=@sysconfdir@
 BINDIR=@bindir@
@@ -395,6 +396,9 @@ install-basic:
 	@echo "     - This installs and configures permissions on the"
 	@echo "       directory for holding the external command file"
 	@echo ""
+	@echo "  make install-eventhandlers"
+	@echo "     - This installs the sample eventhandlers in $(DESTDIR)$(EVENTHANDLERDIR)"
+	@echo ""
 	@echo "  make install-idoutils"
 	@echo "     - This installs the database addon IDOUtils into the"
 	@echo "       destination directory"
@@ -486,10 +490,28 @@ install-commandmode:
 	@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
+
+	@echo ""
+	@echo "*** Sample Eventhandlers installed ***"
+	@echo ""
+
 
 fullinstall:
 	@if [ x$(USE_IDOUTILS) = xyes ]; then \
-		${MAKE} install install-init install-commandmode install-webconf install-idoutils ;\
+		${MAKE} install install-init install-commandmode install-webconf install-idoutils install-eventhandlers;\
 		echo "Run make install-config for installing/overwriting the configs..." ;\
         else \
 		${MAKE} install install-init install-commandmode install-webconf ;\
diff --git a/configure b/configure
index bf7e06a..a57ff06 100755
--- a/configure
+++ b/configure
@@ -651,6 +651,7 @@ PHPAPIEXTCMDDIR
 EXTCMDFILEDIR
 CGILOGDIR
 LOGDIR
+EVENTHANDLERDIR
 PLUGINDIR
 TMPFILE
 TMPDIR
@@ -748,6 +749,7 @@ with_checkresult_dir
 with_temp_dir
 with_temp_file
 with_plugin_dir
+with_eventhandler_dir
 with_log_dir
 with_cgi_log_dir
 with_phpapi_log_dir
@@ -1454,6 +1456,9 @@ Optional Packages:
   --with-plugin-dir=<path>
                           sets path to plugins directory path i.e.
                           $prefix/libexec
+  --with-eventhandler-dir=<path>
+                          sets path to eventhandlers directory path i.e.
+                          $prefix/libexec/eventhandlers
   --with-log-dir=<path>   sets path to logging directory
   --with-cgi-log-dir=<path>
                           sets path to cgi logging directory
@@ -5376,6 +5381,20 @@ if test x$PLUGINDIR = xno; then
 	fi
 
 
+EVENTHANDLERDIR=no
+
+# Check whether --with-eventhandler-dir was given.
+if test "${with_eventhandler_dir+set}" = set; then :
+  withval=$with_eventhandler_dir; EVENTHANDLERDIR=$withval
+else
+  EVENTHANDLERDIR=no
+fi
+
+if test x$EVENTHANDLERDIR = xno; then
+                EVENTHANDLERDIR="$libexecdir/eventhandlers"
+        fi
+
+
 
 
 LOGDIR=no
@@ -8558,6 +8577,8 @@ $as_echo "            Lib directory:  $libdir" >&6; }
 $as_echo "            Bin directory:  $bindir" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:          Plugin directory:  $PLUGINDIR" >&5
 $as_echo "         Plugin directory:  $PLUGINDIR" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result:    Eventhandler directory:  $EVENTHANDLERDIR" >&5
+$as_echo "   Eventhandler directory:  $EVENTHANDLERDIR" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:             Log directory:  $LOGDIR" >&5
 $as_echo "            Log directory:  $LOGDIR" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:         cgi log directory:  $CGILOGDIR" >&5
diff --git a/configure.in b/configure.in
index d2f8a7c..43a031d 100644
--- a/configure.in
+++ b/configure.in
@@ -334,6 +334,14 @@ if test x$PLUGINDIR = xno; then
 	fi
 AC_SUBST(PLUGINDIR)
 
+dnl Location of eventhandler path
+EVENTHANDLERDIR=no
+AC_ARG_WITH(eventhandler-dir,AC_HELP_STRING([--with-eventhandler-dir=<path>],[sets path to eventhandlers directory path i.e. $prefix/libexec/eventhandlers]),EVENTHANDLERDIR=$withval,EVENTHANDLERDIR=no)
+if test x$EVENTHANDLERDIR = xno; then
+                EVENTHANDLERDIR="$libexecdir/eventhandlers"
+        fi
+AC_SUBST(EVENTHANDLERDIR)
+
 
 
 dnl ################
@@ -1368,6 +1376,7 @@ AC_MSG_RESULT([                Temp file:  $TMPFILE])
 AC_MSG_RESULT([            Lib directory:  $libdir])
 AC_MSG_RESULT([            Bin directory:  $bindir])
 AC_MSG_RESULT([         Plugin directory:  $PLUGINDIR])
+AC_MSG_RESULT([   Eventhandler directory:  $EVENTHANDLERDIR])
 AC_MSG_RESULT([            Log directory:  $LOGDIR])
 AC_MSG_RESULT([        cgi log directory:  $CGILOGDIR])
 AC_MSG_RESULT([   Check result directory:  $CHECKRESULTDIR])
diff --git a/subst.in b/subst.in
index dc06a4e..0fa06be 100755
--- a/subst.in
+++ b/subst.in
@@ -29,6 +29,7 @@ while ($f = shift @ARGV) {
 		s|\@LOGDIR\@|@LOGDIR@|g;
 		s|\@CGILOGDIR\@|@CGILOGDIR@|g;
 		s|\@PLUGINDIR\@|@PLUGINDIR@|g;
+		s|\@EVENTHANDLERDIR\@|@EVENTHANDLERDIR@|g;
 		s|\@TMPDIR\@|@TMPDIR@|g;
 		s|\@TMPFILE\@|@TMPFILE@|g;
 		s|\@EXTCMDFILEDIR\@|@EXTCMDFILEDIR@|g;





More information about the icinga-checkins mailing list