diff options
author | madpilot <madpilot@FreeBSD.org> | 2012-05-30 05:13:41 +0800 |
---|---|---|
committer | madpilot <madpilot@FreeBSD.org> | 2012-05-30 05:13:41 +0800 |
commit | 1bda5ccec0716f6523bf954baef21faf02f07835 (patch) | |
tree | c62af566c9e1a710050909c3de3144141ab4da19 | |
parent | bf628411bdd77ca1d65dcd4a18b54e790a61b91f (diff) | |
download | freebsd-ports-gnome-1bda5ccec0716f6523bf954baef21faf02f07835.tar.gz freebsd-ports-gnome-1bda5ccec0716f6523bf954baef21faf02f07835.tar.zst freebsd-ports-gnome-1bda5ccec0716f6523bf954baef21faf02f07835.zip |
Curses-based interface for nagios.
WWW: http://noc.hep.wisc.edu/cnagios.txt
PR: ports/168295
Submitted by: Alexander Y. Grigoryev <alexander.4mail@gmail.com>
Approved by: crees (mentor)
-rw-r--r-- | net-mgmt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/cnagios/Makefile | 43 | ||||
-rw-r--r-- | net-mgmt/cnagios/distinfo | 2 | ||||
-rw-r--r-- | net-mgmt/cnagios/files/patch-Makefile.in | 48 | ||||
-rw-r--r-- | net-mgmt/cnagios/pkg-descr | 3 | ||||
-rw-r--r-- | net-mgmt/cnagios/pkg-plist | 10 |
6 files changed, 107 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 27ca37c699d7..6b476b40df97 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -49,6 +49,7 @@ SUBDIR += cisco_conf SUBDIR += ciscoconf SUBDIR += clog + SUBDIR += cnagios SUBDIR += collectd SUBDIR += collectd5 SUBDIR += confregdecode diff --git a/net-mgmt/cnagios/Makefile b/net-mgmt/cnagios/Makefile new file mode 100644 index 000000000000..1863e5a83a07 --- /dev/null +++ b/net-mgmt/cnagios/Makefile @@ -0,0 +1,43 @@ +# New ports collection makefile for: cnagios +# Date created: 23 May 2012 +# Whom: Alexander Y. Grigoryev <alexander.4mail@gmail.com> +# +# $FreeBSD$ + +PORTNAME= cnagios +PORTVERSION= 0.29 +CATEGORIES= net-mgmt +MASTER_SITES= ftp://noc.hep.wisc.edu/src/cnagios/ \ + ftp://noc.hep.wisc.edu/src/cnagios/old-versions/ + +MAINTAINER= alexander.4mail@gmail.com +COMMENT= Curses-based interface for nagios + +LICENSE= ISCL + +RUN_DEPENDS= nagios>=3.0:${PORTSDIR}/net-mgmt/nagios + +NAGIOSDIR?= /var/spool/nagios +ETCDIR= ${PREFIX}/etc/nagios +GNU_CONFIGURE= YES +CONFIGURE_ARGS= --with-etc-dir="${ETCDIR}" \ + --with-var-dir="${NAGIOSDIR}" \ + --with-status-file="${NAGIOSDIR}/status.dat" \ + --with-nagios-data=3 +USE_PERL5= YES +ALL_TARGET= cnagios + +MAN1= cnagios.1 + +post-install: + @if [ ! -f ${ETCDIR}/cnagiosrc ]; then \ + ${CP} -p ${ETCDIR}/cnagiosrc.sample ${ETCDIR}/cnagiosrc ; \ + fi + @if [ ! -f ${ETCDIR}/cnagios.help ]; then \ + ${CP} -p ${ETCDIR}/cnagios.help.sample ${ETCDIR}/cnagios.help ; \ + fi + @if [ ! -f ${ETCDIR}/cnagios.pl ]; then \ + ${CP} -p ${ETCDIR}/cnagios.pl.sample ${ETCDIR}/cnagios.pl ; \ + fi + +.include <bsd.port.mk> diff --git a/net-mgmt/cnagios/distinfo b/net-mgmt/cnagios/distinfo new file mode 100644 index 000000000000..2885aa11383c --- /dev/null +++ b/net-mgmt/cnagios/distinfo @@ -0,0 +1,2 @@ +SHA256 (cnagios-0.29.tar.gz) = f2001c82dff5fc8bf1faaa75acd202bf02b5934b25fda3b1751bfb694ebd4351 +SIZE (cnagios-0.29.tar.gz) = 81290 diff --git a/net-mgmt/cnagios/files/patch-Makefile.in b/net-mgmt/cnagios/files/patch-Makefile.in new file mode 100644 index 000000000000..689b03fbbae7 --- /dev/null +++ b/net-mgmt/cnagios/files/patch-Makefile.in @@ -0,0 +1,48 @@ +--- Makefile.in.orig 2011-03-28 17:45:52.000000000 +0200 ++++ Makefile.in 2012-05-25 19:38:11.948782413 +0200 +@@ -27,39 +27,20 @@ + + + install: +- @if [ -f @prefix@/bin/cnagios ]; then \ +- echo mv @prefix@/bin/cnagios @prefix@/bin/cnagios.OLD ; \ +- mv @prefix@/bin/cnagios @prefix@/bin/cnagios.OLD ; \ +- fi + @echo installing cnagios in @prefix@/bin + @$(INSTALL) -c -m 755 cnagios @prefix@/bin/cnagios + + @echo installing cnagios.1 in @prefix@/man/man1 + @$(INSTALL) -c -m 755 cnagios.1 @prefix@/man/man1/cnagios.1 + +- @if [ ! -f @NAGIOS_ETC_DIR@/cnagiosrc ]; then \ +- echo installing cnagiosrc in @NAGIOS_ETC_DIR@ ; \ +- $(INSTALL) -c -m 644 cnagiosrc @NAGIOS_ETC_DIR@/cnagiosrc ; \ +- else \ +- echo installing cnagiosrc as @NAGIOS_ETC_DIR@/cnagiosrc.NEW ; \ +- $(INSTALL) -c -m 644 cnagiosrc @NAGIOS_ETC_DIR@/cnagiosrc.NEW ; \ +- fi ++ echo installing cnagiosrc.sample in @NAGIOS_ETC_DIR@ ++ $(INSTALL) -c -m 644 cnagiosrc @NAGIOS_ETC_DIR@/cnagiosrc.sample + +- @if [ ! -f @NAGIOS_ETC_DIR@/cnagios.help ]; then \ +- echo installing cnagios.help in @NAGIOS_ETC_DIR@ ; \ +- $(INSTALL) -c -m 644 cnagios.help @NAGIOS_ETC_DIR@/cnagios.help ; \ +- else \ +- echo installing cnagios.help as @NAGIOS_ETC_DIR@/cnagios.help.NEW ; \ +- $(INSTALL) -c -m 644 cnagios.help @NAGIOS_ETC_DIR@/cnagios.help.NEW ; \ +- fi ++ echo installing cnagios.help.sample in @NAGIOS_ETC_DIR@ ++ $(INSTALL) -c -m 644 cnagios.help @NAGIOS_ETC_DIR@/cnagios.help.sample + +- @if [ ! -f @NAGIOS_ETC_DIR@/cnagios.pl ]; then \ +- echo installing cnagios.pl in @NAGIOS_ETC_DIR@ ; \ +- $(INSTALL) -c -m 644 cnagios.pl @NAGIOS_ETC_DIR@/cnagios.pl ; \ +- else \ +- echo installing cnagios.pl as @NAGIOS_ETC_DIR@/cnagios.pl.NEW ; \ +- $(INSTALL) -c -m 644 cnagios.pl @NAGIOS_ETC_DIR@/cnagios.pl.NEW ; \ +- fi ++ echo installing cnagios.pl in @NAGIOS_ETC_DIR@ ++ $(INSTALL) -c -m 644 cnagios.pl @NAGIOS_ETC_DIR@/cnagios.pl.sample + + install2: + @if [ -f /usr/local/bin/cnagios ]; then \ diff --git a/net-mgmt/cnagios/pkg-descr b/net-mgmt/cnagios/pkg-descr new file mode 100644 index 000000000000..208d8e01f070 --- /dev/null +++ b/net-mgmt/cnagios/pkg-descr @@ -0,0 +1,3 @@ +Curses-based interface for nagios. + +WWW: http://noc.hep.wisc.edu/cnagios.txt diff --git a/net-mgmt/cnagios/pkg-plist b/net-mgmt/cnagios/pkg-plist new file mode 100644 index 000000000000..5cdeb895ac4d --- /dev/null +++ b/net-mgmt/cnagios/pkg-plist @@ -0,0 +1,10 @@ +bin/cnagios +@unexec if cmp -s %D/%%ETCDIR%%/cnagiosrc.sample %D/%%ETCDIR%%/cnagiosrc; then rm -f %D/%%ETCDIR%%/cnagiosrc; fi +%%ETCDIR%%/cnagiosrc.sample +@exec if [ ! -f %D/%%ETCDIR%%/cnagiosrc ] ; then cp -p %D/%F %B/cnagiosrc; fi +@unexec if cmp -s %D/%%ETCDIR%%/cnagios.help.sample %D/%%ETCDIR%%/cnagios.help; then rm -f %D/%%ETCDIR%%/cnagios.help; fi +%%ETCDIR%%/cnagios.help.sample +@exec if [ ! -f %D/%%ETCDIR%%/cnagios.help ] ; then cp -p %D/%F %B/cnagios.help; fi +@unexec if cmp -s %D/%%ETCDIR%%/cnagios.pl.sample %D/%%ETCDIR%%/cnagios.pl; then rm -f %D/%%ETCDIR%%/cnagios.pl; fi +%%ETCDIR%%/cnagios.pl.sample +@exec if [ ! -f %D/%%ETCDIR%%/cnagios.pl ] ; then cp -p %D/%F %B/cnagios.pl; fi |