aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nsca
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2007-12-26 03:38:41 +0800
committermm <mm@FreeBSD.org>2007-12-26 03:38:41 +0800
commitee329f0485f97f4591021eb22bcc79cc5971758a (patch)
tree94bd7e3862ef6157d60f0ba379a586b6e4ab167f /net-mgmt/nsca
parent1d08ecf6da9c6069fcf3b4536c2a3efcda176af4 (diff)
downloadfreebsd-ports-graphics-ee329f0485f97f4591021eb22bcc79cc5971758a.tar.gz
freebsd-ports-graphics-ee329f0485f97f4591021eb22bcc79cc5971758a.tar.zst
freebsd-ports-graphics-ee329f0485f97f4591021eb22bcc79cc5971758a.zip
- Change install location of default configuration files
- Add pkg-message information for client and server installs - Bump PORTREVISION PR: ports/117950
Diffstat (limited to 'net-mgmt/nsca')
-rw-r--r--net-mgmt/nsca/Makefile20
-rw-r--r--net-mgmt/nsca/files/pkg-message.client.in9
-rw-r--r--net-mgmt/nsca/files/pkg-message.in9
-rw-r--r--net-mgmt/nsca/pkg-plist5
4 files changed, 39 insertions, 4 deletions
diff --git a/net-mgmt/nsca/Makefile b/net-mgmt/nsca/Makefile
index b2495fc95e5..84bc3de560c 100644
--- a/net-mgmt/nsca/Makefile
+++ b/net-mgmt/nsca/Makefile
@@ -7,6 +7,7 @@
PORTNAME= nsca
PORTVERSION= 2.7.2
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nagios
@@ -19,15 +20,25 @@ RUN_DEPENDS= nagios:${PORTSDIR}/net-mgmt/nagios
.endif
LIB_DEPENDS= mcrypt.8:${PORTSDIR}/security/libmcrypt
+.if defined(WITHOUT_SERVER) && defined(WITHOUT_CLIENT)
+IGNORE= you cannot define WITHOUT_SERVER and WITHOUT_CLIENT
+.endif
+
GNU_CONFIGURE= yes
USE_PERL5= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --localstatedir=/var/spool/nagios
+DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
.if !defined(WITHOUT_SERVER)
USE_RC_SUBR= nsca
PLIST_SUB+= SERVER=""
+WITHOUT_CLIENT= yes
+PKGMESSAGE= ${WRKDIR}/pkg-message
+SUB_FILES+= pkg-message
.else
PLIST_SUB+= SERVER="@comment "
+PKGMESSAGE= ${WRKDIR}/pkg-message.client
+SUB_FILES+= pkg-message.client
.endif
.if !defined(WITHOUT_CLIENT)
@@ -41,15 +52,20 @@ DOCS= Changelog LEGAL README SECURITY
do-install:
.if !defined(WITHOUT_CLIENT)
${INSTALL_PROGRAM} ${WRKSRC}/src/send_nsca ${PREFIX}/sbin/send_nsca
- ${INSTALL_DATA} ${WRKSRC}/sample-config/send_nsca.cfg ${PREFIX}/etc/send_nsca.cfg-sample
+ ${MKDIR} ${PREFIX}/etc/nagios
+ ${INSTALL_DATA} ${WRKSRC}/sample-config/send_nsca.cfg ${PREFIX}/etc/nagios/send_nsca.cfg-sample
.endif
.if !defined(WITHOUT_SERVER)
${INSTALL_PROGRAM} ${WRKSRC}/src/nsca ${PREFIX}/sbin/nsca
- ${INSTALL_DATA} ${WRKSRC}/sample-config/nsca.cfg ${PREFIX}/etc/nsca.cfg-sample
+ ${MKDIR} ${PREFIX}/etc/nagios
+ ${INSTALL_DATA} ${WRKSRC}/sample-config/nsca.cfg ${PREFIX}/etc/nagios/nsca.cfg-sample
.endif
+
+post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/net-mgmt/nsca/files/pkg-message.client.in b/net-mgmt/nsca/files/pkg-message.client.in
new file mode 100644
index 00000000000..44387080f4f
--- /dev/null
+++ b/net-mgmt/nsca/files/pkg-message.client.in
@@ -0,0 +1,9 @@
+
+*** ATTENTION ***
+
+This port installs only the client part of NSCA ("send_nsca").
+If you need the nsca daemon install the net-mgmt/nsca port.
+
+The default configuration file is installed at:
+%%PREFIX%%/etc/nagios/send_nsca.cfg-sample
+
diff --git a/net-mgmt/nsca/files/pkg-message.in b/net-mgmt/nsca/files/pkg-message.in
new file mode 100644
index 00000000000..62e33835d32
--- /dev/null
+++ b/net-mgmt/nsca/files/pkg-message.in
@@ -0,0 +1,9 @@
+
+*** ATTENTION ***
+
+This port includes only the server part of NSCA ("nsca").
+If you need the "send_nsca" utility install the net-mgmt/nsca-client port.
+
+The default configuration file is installed at:
+%%PREFIX%%/etc/nagios/nsca.cfg-sample
+
diff --git a/net-mgmt/nsca/pkg-plist b/net-mgmt/nsca/pkg-plist
index 223502ee3e0..318217cac91 100644
--- a/net-mgmt/nsca/pkg-plist
+++ b/net-mgmt/nsca/pkg-plist
@@ -4,7 +4,8 @@
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/SECURITY
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%SERVER%%etc/nsca.cfg-sample
+%%SERVER%%etc/nagios/nsca.cfg-sample
%%SERVER%%sbin/nsca
-%%CLIENT%%etc/send_nsca.cfg-sample
+%%CLIENT%%etc/nagios/send_nsca.cfg-sample
%%CLIENT%%sbin/send_nsca
+@dirrmtry etc/nagios