mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-05 01:55:52 +00:00
5d043e0bd3
1. Tidy up the header 2. nrpe2 runs as an unpriviliged user, so REQUIRE: LOGIN is manadatory 3. Move load_rc_config up higher 4. Since _enable and _configfile are mandatory they should use := 5. Only sets command_args once, and puts -d last as is traditional. 6. Pulls the pidfile from nrpe.cfg, which means it only has to be set once.
95 lines
2.3 KiB
Makefile
95 lines
2.3 KiB
Makefile
# Created by: Paul Dlug<paul@nerdlabs.com>
|
|
#
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= nrpe
|
|
DISTVERSION= 2.13
|
|
PORTREVISION= 2
|
|
CATEGORIES= net-mgmt
|
|
MASTER_SITES= SF/nagios/${PORTNAME}-2.x/${PORTNAME}-${PORTVERSION}
|
|
|
|
MAINTAINER= jarrod@downtools.com.au
|
|
COMMENT= Nagios Remote Plugin Executor
|
|
|
|
RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
|
|
|
|
LATEST_LINK= nrpe2
|
|
|
|
USE_PERL5_BUILD= yes
|
|
USE_RC_SUBR= nrpe2
|
|
|
|
CONFLICTS= nrpe-1.*
|
|
|
|
OPTIONS_DEFINE= SSL ARGS
|
|
SSL_DESC= Enable SSL support (disables plain-text server)
|
|
ARGS_DESC= Enable command argument processing **Security Risk**
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
NAGIOSUSER?= nagios
|
|
NAGIOSGROUP?= nagios
|
|
NAGIOSDIR?= /var/spool/nagios
|
|
USERS= ${NAGIOSUSER}
|
|
GROUPS= ${NAGIOSGROUP}
|
|
|
|
NAGIOSUID= 181
|
|
NAGIOSGID= ${NAGIOSUID}
|
|
|
|
CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \
|
|
--libexecdir=${PREFIX}/libexec/nagios \
|
|
--sysconfdir=${PREFIX}/etc \
|
|
--localstatedir=${NAGIOSDIR} \
|
|
--with-nrpe-user=${NAGIOSUSER} \
|
|
--with-nrpe-group=${NAGIOSGROUP}
|
|
|
|
PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
|
|
NAGIOSUSER=${NAGIOSUSER} \
|
|
NAGIOSGROUP=${NAGIOSGROUP} \
|
|
NAGIOSUID=${NAGIOSUID} \
|
|
NAGIOSGID=${NAGIOSGID}
|
|
|
|
SUB_FILES= pkg-install \
|
|
pkg-deinstall \
|
|
pkg-message
|
|
|
|
SUB_LIST= PREFIX=${PREFIX} \
|
|
${PLIST_SUB}
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PORT_OPTIONS:MSSL}
|
|
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
|
|
CONFIGURE_ARGS+= --enable-ssl
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-ssl
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MARGS}
|
|
CONFIGURE_ARGS+= --enable-command-args
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-command-args
|
|
.endif
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e 's#/var/run/nrpe.pid#/var/run/nrpe2/nrpe2.pid#g' \
|
|
-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
|
|
|
|
pre-install:
|
|
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe2
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${PREFIX}/libexec/nagios/check_nrpe2
|
|
${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample
|
|
${MKDIR} ${NAGIOSDIR}
|
|
|
|
post-install:
|
|
@${SH} ${PKGINSTALL} ${DISTNAME} POST-INSTALL
|
|
@[ -f ${PREFIX}/etc/nrpe.cfg ] || \
|
|
${CP} -p ${PREFIX}/etc/nrpe.cfg-sample ${PREFIX}/etc/nrpe.cfg
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
.include <bsd.port.post.mk>
|