2012-10-08 08:15:28 +00:00
|
|
|
# Created by: Paul Dlug<paul@nerdlabs.com>
|
2003-01-03 02:49:08 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2008-11-21 21:00:22 +00:00
|
|
|
PORTNAME= nrpe
|
2012-02-18 17:21:41 +00:00
|
|
|
DISTVERSION= 2.13
|
2012-10-08 08:15:28 +00:00
|
|
|
PORTREVISION= 2
|
2006-04-29 18:28:31 +00:00
|
|
|
CATEGORIES= net-mgmt
|
2009-08-22 00:32:25 +00:00
|
|
|
MASTER_SITES= SF/nagios/${PORTNAME}-2.x/${PORTNAME}-${PORTVERSION}
|
2003-01-03 02:49:08 +00:00
|
|
|
|
2010-12-30 17:46:30 +00:00
|
|
|
MAINTAINER= jarrod@downtools.com.au
|
2006-04-29 18:28:31 +00:00
|
|
|
COMMENT= Nagios Remote Plugin Executor
|
2003-01-03 02:49:08 +00:00
|
|
|
|
2006-04-29 18:28:31 +00:00
|
|
|
RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
|
2003-01-03 02:49:08 +00:00
|
|
|
|
2008-11-21 21:00:22 +00:00
|
|
|
LATEST_LINK= nrpe2
|
|
|
|
|
2004-12-14 17:12:02 +00:00
|
|
|
USE_PERL5_BUILD= yes
|
2007-07-24 12:57:40 +00:00
|
|
|
USE_RC_SUBR= nrpe2
|
|
|
|
|
2008-11-21 21:00:22 +00:00
|
|
|
CONFLICTS= nrpe-1.*
|
|
|
|
|
2012-09-10 15:14:14 +00:00
|
|
|
OPTIONS_DEFINE= SSL ARGS
|
|
|
|
SSL_DESC= Enable SSL support (disables plain-text server)
|
|
|
|
ARGS_DESC= Enable command argument processing **Security Risk**
|
2007-07-24 12:57:40 +00:00
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
2005-05-26 19:26:04 +00:00
|
|
|
|
2007-07-24 12:57:40 +00:00
|
|
|
NAGIOSUSER?= nagios
|
|
|
|
NAGIOSGROUP?= nagios
|
|
|
|
NAGIOSDIR?= /var/spool/nagios
|
2012-09-10 15:14:14 +00:00
|
|
|
USERS= ${NAGIOSUSER}
|
|
|
|
GROUPS= ${NAGIOSGROUP}
|
2007-07-24 12:57:40 +00:00
|
|
|
|
|
|
|
NAGIOSUID= 181
|
|
|
|
NAGIOSGID= ${NAGIOSUID}
|
|
|
|
|
2008-11-21 21:00:22 +00:00
|
|
|
CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \
|
2007-07-24 12:57:40 +00:00
|
|
|
--libexecdir=${PREFIX}/libexec/nagios \
|
|
|
|
--sysconfdir=${PREFIX}/etc \
|
2008-11-21 21:00:22 +00:00
|
|
|
--localstatedir=${NAGIOSDIR} \
|
2007-07-24 12:57:40 +00:00
|
|
|
--with-nrpe-user=${NAGIOSUSER} \
|
2007-07-26 13:03:44 +00:00
|
|
|
--with-nrpe-group=${NAGIOSGROUP}
|
2005-05-26 19:26:04 +00:00
|
|
|
|
2008-11-21 21:00:22 +00:00
|
|
|
PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
|
2007-07-24 12:57:40 +00:00
|
|
|
NAGIOSUSER=${NAGIOSUSER} \
|
|
|
|
NAGIOSGROUP=${NAGIOSGROUP} \
|
|
|
|
NAGIOSUID=${NAGIOSUID} \
|
|
|
|
NAGIOSGID=${NAGIOSGID}
|
2004-08-28 17:56:17 +00:00
|
|
|
|
2007-07-24 12:57:40 +00:00
|
|
|
SUB_FILES= pkg-install \
|
|
|
|
pkg-deinstall \
|
|
|
|
pkg-message
|
|
|
|
|
2008-11-21 21:00:22 +00:00
|
|
|
SUB_LIST= PREFIX=${PREFIX} \
|
|
|
|
${PLIST_SUB}
|
2004-12-13 19:58:55 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2012-09-10 15:14:14 +00:00
|
|
|
.if ${PORT_OPTIONS:MSSL}
|
2006-04-29 18:28:31 +00:00
|
|
|
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
|
2004-08-28 17:56:17 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-ssl
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-ssl
|
|
|
|
.endif
|
2003-01-09 22:13:58 +00:00
|
|
|
|
2012-09-10 15:14:14 +00:00
|
|
|
.if ${PORT_OPTIONS:MARGS}
|
2004-12-13 19:58:55 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-command-args
|
2008-11-21 21:00:22 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-command-args
|
2004-09-19 01:32:46 +00:00
|
|
|
.endif
|
|
|
|
|
2007-07-24 12:57:40 +00:00
|
|
|
post-patch:
|
2012-09-12 20:57:27 +00:00
|
|
|
@${REINPLACE_CMD} -e 's#/var/run/nrpe.pid#/var/run/nrpe2/nrpe2.pid#g' \
|
2007-07-24 12:57:40 +00:00
|
|
|
-e 's#/usr/lib/nagios/plugins/#${LOCALBASE}/libexec/nagios/#g' \
|
|
|
|
-e 's#/usr/bin/sudo#${LOCALBASE}/bin/sudo#g' \
|
|
|
|
${WRKSRC}/sample-config/nrpe.cfg.in
|
2006-04-29 18:28:31 +00:00
|
|
|
|
2006-12-25 14:32:45 +00:00
|
|
|
pre-install:
|
2007-07-24 12:57:40 +00:00
|
|
|
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
|
2006-12-25 14:32:45 +00:00
|
|
|
|
2003-01-03 02:49:08 +00:00
|
|
|
do-install:
|
2004-08-28 17:56:17 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe2
|
2007-07-24 12:57:40 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${PREFIX}/libexec/nagios/check_nrpe2
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample
|
2010-10-28 03:27:42 +00:00
|
|
|
${MKDIR} ${NAGIOSDIR}
|
2003-01-03 02:49:08 +00:00
|
|
|
|
2006-12-25 14:32:45 +00:00
|
|
|
post-install:
|
2008-11-21 21:00:22 +00:00
|
|
|
@${SH} ${PKGINSTALL} ${DISTNAME} POST-INSTALL
|
2012-09-12 20:57:27 +00:00
|
|
|
@[ -f ${PREFIX}/etc/nrpe.cfg ] || \
|
|
|
|
${CP} -p ${PREFIX}/etc/nrpe.cfg-sample ${PREFIX}/etc/nrpe.cfg
|
2007-07-24 12:57:40 +00:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2006-12-25 14:32:45 +00:00
|
|
|
|
2004-09-19 01:32:46 +00:00
|
|
|
.include <bsd.port.post.mk>
|