summaryrefslogtreecommitdiff
path: root/net/nagios-plugin-spamd
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2020-03-02 17:07:58 +0000
committergdt <gdt@pkgsrc.org>2020-03-02 17:07:58 +0000
commit0023de664095671ec981a22f2956a539602d584e (patch)
treedcc800ff955bf7af66f560135e4fad12249807b2 /net/nagios-plugin-spamd
parent4f44f98a4228e430567ba9df05b264e839a8f394 (diff)
downloadpkgsrc-0023de664095671ec981a22f2956a539602d584e.tar.gz
net/nagios-plugin-spamd: Fix spamc embedded path
Upstream has a hard-coded path to spamc which is not correct in the pkgsrc context. Previously there was a SUBST block to change this, but it was changed to an odd directory with a missing /, and it seems this could never have worked. Change the SUBST block to result in looking for spamc in ${PREFIX}/bin/spamc, which is where the pkgsrc build of spamassassin puts it. Add comments explaining why there is both this SUBST block (embedded spamc path) and REPLACE_PERL (interpreter path). From Mike Pumford on pkgsrc-users.
Diffstat (limited to 'net/nagios-plugin-spamd')
-rw-r--r--net/nagios-plugin-spamd/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/nagios-plugin-spamd/Makefile b/net/nagios-plugin-spamd/Makefile
index 65e50cec63b..312b6b24cc5 100644
--- a/net/nagios-plugin-spamd/Makefile
+++ b/net/nagios-plugin-spamd/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2019/11/04 08:00:25 wiz Exp $
+# $NetBSD: Makefile,v 1.17 2020/03/02 17:07:58 gdt Exp $
DISTNAME= check_spamd-1.6.0
PKGNAME= nagios-plugin-${DISTNAME:S/check_//1}
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= net mail
MASTER_SITES= # http://exchange.nagios.org/components/com_mtree/
EXTRACT_SUFX= .pl
@@ -22,15 +22,17 @@ NO_BUILD= yes
USE_TOOLS+= perl:run
+# Fix interpreter line in check_spamd script.
REPLACE_PERL+= ${DISTFILES}
PLUGIN_DIR= ${PREFIX}/libexec/nagios
+# Fix embedded path to spamc within check_spamd script.
SUBST_CLASSES+= check_spamd
SUBST_STAGE.check_spamd= post-configure
SUBST_FILES.check_spamd= ${DISTFILES}
SUBST_MESSAGE.check_spamd= Fixing path to spamc.
-SUBST_SED.check_spamd= -e 's|/usr/local/perl/bin/|${PREFIX}/${PERL5_SUB_INSTALLVENDORBIN}|1'
+SUBST_SED.check_spamd= -e 's|/usr/local/perl/bin/|${PREFIX}/bin/|1'
INSTALLATION_DIRS+= ${PLUGIN_DIR}