diff options
author | Dan Langille <dvl@FreeBSD.org> | 2019-03-22 13:22:40 +0000 |
---|---|---|
committer | Dan Langille <dvl@FreeBSD.org> | 2019-03-22 13:22:40 +0000 |
commit | c21e5729047348ca99a029b7c98a01868118ecb2 (patch) | |
tree | a2721a2be55f0ed218694882432c4d077df5f27c /net-mgmt/cnagios4 | |
parent | 09a213350fe468c2bb2fb4de28f3dbf249791da9 (diff) |
Add cnagios4, based on net-mgmt/cnagios but uses Nagios 4
Why not create options on net-mgmt/cnagios for Nagios 3 or 4?
Because one can use both Nagios 3 and Nagios 4 and therefore
you need different packages in your repo.
PR: 236245
Notes
Notes:
svn path=/head/; revision=496565
Diffstat (limited to 'net-mgmt/cnagios4')
-rw-r--r-- | net-mgmt/cnagios4/Makefile | 36 | ||||
-rw-r--r-- | net-mgmt/cnagios4/distinfo | 2 | ||||
-rw-r--r-- | net-mgmt/cnagios4/files/patch-Makefile.in | 47 | ||||
-rw-r--r-- | net-mgmt/cnagios4/pkg-descr | 8 | ||||
-rw-r--r-- | net-mgmt/cnagios4/pkg-plist | 5 |
5 files changed, 98 insertions, 0 deletions
diff --git a/net-mgmt/cnagios4/Makefile b/net-mgmt/cnagios4/Makefile new file mode 100644 index 000000000000..a26b660787d4 --- /dev/null +++ b/net-mgmt/cnagios4/Makefile @@ -0,0 +1,36 @@ +# Created by: Dan Langille <dvl@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= cnagios +PORTVERSION= 0.32 +CATEGORIES= net-mgmt +PKGNAMESUFFIX= 4 + +MAINTAINER= dvl@FreeBSD.org +COMMENT= Curses-based interface for nagios + +LICENSE= ISCL + +RUN_DEPENDS= nagios4>=3.0:net-mgmt/nagios4 + +USES= ncurses perl5 + +CONFLICTS_INSTALL= cnagios + +USE_GITHUB= yes +GH_ACCOUNT= dannywarren + +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 +MAKE_ARGS= LIBS="-lncurses" +ALL_TARGET= cnagios + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cnagios + +.include <bsd.port.mk> diff --git a/net-mgmt/cnagios4/distinfo b/net-mgmt/cnagios4/distinfo new file mode 100644 index 000000000000..9d01c9ae3171 --- /dev/null +++ b/net-mgmt/cnagios4/distinfo @@ -0,0 +1,2 @@ +SHA256 (dannywarren-cnagios-0.32_GH0.tar.gz) = cda69a094d8972364a0d9c25c9e6dd96f4c523adeeb4175806e864e1277f6a39 +SIZE (dannywarren-cnagios-0.32_GH0.tar.gz) = 81775 diff --git a/net-mgmt/cnagios4/files/patch-Makefile.in b/net-mgmt/cnagios4/files/patch-Makefile.in new file mode 100644 index 000000000000..636749a7ac5e --- /dev/null +++ b/net-mgmt/cnagios4/files/patch-Makefile.in @@ -0,0 +1,47 @@ +--- Makefile.in.orig 2015-05-15 16:31:56 UTC ++++ Makefile.in +@@ -27,39 +27,11 @@ cnagios: $(OBJS) $(HDRS) + + + 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 +- +- @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 +- +- @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 ++ $(INSTALL) -c -m 755 cnagios $(DESTDIR)@prefix@/bin/cnagios ++ $(INSTALL) -c -m 444 cnagios.1 $(DESTDIR)@prefix@/man/man1/cnagios.1 ++ $(INSTALL) -c -m 644 cnagiosrc $(DESTDIR)@NAGIOS_ETC_DIR@/cnagiosrc.sample ++ $(INSTALL) -c -m 644 cnagios.help $(DESTDIR)@NAGIOS_ETC_DIR@/cnagios.help.sample ++ $(INSTALL) -c -m 644 cnagios.pl $(DESTDIR)@NAGIOS_ETC_DIR@/cnagios.pl.sample + + install2: + @if [ -f /usr/local/bin/cnagios ]; then \ diff --git a/net-mgmt/cnagios4/pkg-descr b/net-mgmt/cnagios4/pkg-descr new file mode 100644 index 000000000000..ac606156c076 --- /dev/null +++ b/net-mgmt/cnagios4/pkg-descr @@ -0,0 +1,8 @@ +Cnagios is a full-screen terminal interface for viewing Nagios HOST +and SERVICE objects, and the durations of their current states. It's +lightning fast because it's written in C using the curses library. +And it's super flexible because it uses the perl C library to shorten +and alter host, service and plugin output and filter the displayed +HOSTs or SERVICEs. + +WWW: https://github.com/dannywarren/cnagios diff --git a/net-mgmt/cnagios4/pkg-plist b/net-mgmt/cnagios4/pkg-plist new file mode 100644 index 000000000000..5ac794a5a8cb --- /dev/null +++ b/net-mgmt/cnagios4/pkg-plist @@ -0,0 +1,5 @@ +bin/cnagios +@sample %%ETCDIR%%/cnagios.help.sample +@sample %%ETCDIR%%/cnagios.pl.sample +@sample %%ETCDIR%%/cnagiosrc.sample +man/man1/cnagios.1.gz |