git: 521c4c6e6500 - main - net-mgmt/nrpe: Adding monplugins flavor to nrpe
Date: Wed, 08 Jan 2025 14:37:05 UTC
The branch main has been updated by kiwi:
URL: https://cgit.FreeBSD.org/ports/commit/?id=521c4c6e650075b92d0f9e9256af54c9b8913732
commit 521c4c6e650075b92d0f9e9256af54c9b8913732
Author: Xavier Beaudouin <kiwi@FreeBSD.org>
AuthorDate: 2025-01-08 10:10:10 +0000
Commit: Xavier Beaudouin <kiwi@FreeBSD.org>
CommitDate: 2025-01-08 14:35:34 +0000
net-mgmt/nrpe: Adding monplugins flavor to nrpe
Some user asked to add a flavor to permit to have nrpe already
packaged with monplugins.
This patch add this functionality and has been tested (both
flavors default and monplugins with poudriere under 13.4-RELEASE).
Sponsored by: Klara, Inc.
Approved by: 0mp (mentor)
Approved by: bofh (maintainer)
Differential Revision: https://reviews.freebsd.org/D48111
---
net-mgmt/nrpe/Makefile | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/net-mgmt/nrpe/Makefile b/net-mgmt/nrpe/Makefile
index 011ab87d0645..02b1cdbce02d 100644
--- a/net-mgmt/nrpe/Makefile
+++ b/net-mgmt/nrpe/Makefile
@@ -10,6 +10,10 @@ WWW= https://www.nagios.org/
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/LICENSE.md
+FLAVORS= default monplugins
+FLAVOR?= ${FLAVORS:[1]}
+monplugins_PKGNAMESUFFIX= -monplugins
+
USES= perl5
USE_GITHUB= yes
GH_ACCOUNT= NagiosEnterprises
@@ -36,7 +40,7 @@ PLIST_SUB= NAGIOSUSER=${NAGIOSUSER} \
NRPE_PIDDIR=${NRPE_PIDDIR}
OPTIONS_DEFINE= SSL ARGS
-OPTIONS_DEFAULT=NAGPLUGINS SSL
+OPTIONS_DEFAULT=SSL
OPTIONS_RADIO= PLUGINS
OPTIONS_RADIO_PLUGINS= MONPLUGINS NAGPLUGINS
@@ -57,6 +61,14 @@ NAGIOSGROUP?= nagios
NRPE_PIDDIR?= /var/run/nrpe
+.if ${FLAVOR:U} == default
+OPTIONS_DEFAULT+= NAGPLUGINS
+.endif
+
+.if ${FLAVOR:U} == monplugins
+OPTIONS_DEFAULT+= MONPLUGINS
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|/var/run/nrpe.pid|${NRPE_PIDDIR}/nrpe.pid|g' \
-e 's|/usr/lib/nagios/plugins/|${LOCALBASE}/libexec/nagios/|g' \