aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2014-05-09 16:23:41 +0000
committerMathieu Arnold <mat@FreeBSD.org>2014-05-09 16:23:41 +0000
commitd6e16e502767e3dfb72066e06f936e0fe1bbb972 (patch)
treeef44fa3db72b58a4cc393420679df8c00846e2f9 /net-mgmt
parentc5640541556537e6f720d7df3dc52751f3091801 (diff)
downloadports-d6e16e502767e3dfb72066e06f936e0fe1bbb972.tar.gz
ports-d6e16e502767e3dfb72066e06f936e0fe1bbb972.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/nagios-plugins/Makefile33
-rw-r--r--net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in11
2 files changed, 32 insertions, 12 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile
index c69f0169d8f9..7dda55d25b79 100644
--- a/net-mgmt/nagios-plugins/Makefile
+++ b/net-mgmt/nagios-plugins/Makefile
@@ -3,17 +3,22 @@
PORTNAME= nagios-plugins
PORTVERSION= 2.0.1
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net-mgmt
-MASTER_SITES= https://www.nagios-plugins.org/download/
+MASTER_SITES= https://www.nagios-plugins.org/download/ \
+ LOCAL/mat/${PORTNAME}
MAINTAINER= mat@FreeBSD.org
COMMENT= Plugins for Nagios
-USES= charsetfix gmake perl5
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+USES= charsetfix gmake perl5 libtool
CHARSETFIX_MAKEFILEIN=Makefile.am
USE_SUBMAKE= yes
-USE_AUTOTOOLS= libtool aclocal autoconf automake
+USE_AUTOTOOLS= aclocal autoconf automake
ACLOCAL_ARGS= -I m4 -I gl/m4
AUTOMAKE_ARGS= --add-missing
@@ -67,6 +72,10 @@ CONFIGURE_ARGS+=--with-nagios-user=${NAGIOSUSER} \
--localstatedir=${NAGIOSDIR} \
--prefix=${PREFIX}
+# Also, force some commands with their expected paths so that they don't get
+# disabled.
+CONFIGURE_ARGS+=--with-qmail-qstat-command=/var/qmail/bin/qmail-qstat
+
CONFIGURE_ENV= PERL=${PERL}
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
@@ -109,17 +118,17 @@ DBI_LIB_DEPENDS= libdbi.so:${PORTSDIR}/databases/libdbi
DBI_CONFIGURE_WITH= dbi
DNS_BINDTOOLS_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind-tools
-DNS_BINDTOOLS_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \
- --with-nslookup-command=/usr/local/bin/nslookup
+DNS_BINDTOOLS_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \
+ --with-nslookup-command=${LOCALBASE}/bin/nslookup
DNS_BIND98_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind98
-DNS_BIND98_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \
- --with-nslookup-command=/usr/local/bin/nslookup
+DNS_BIND98_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \
+ --with-nslookup-command=${LOCALBASE}/bin/nslookup
DNS_BIND99_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind99
-DNS_BIND99_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \
- --with-nslookup-command=/usr/local/bin/nslookup
+DNS_BIND99_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \
+ --with-nslookup-command=${LOCALBASE}/bin/nslookup
DNS_BIND910_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind910
-DNS_BIND910_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \
- --with-nslookup-command=/usr/local/bin/nslookup
+DNS_BIND910_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \
+ --with-nslookup-command=${LOCALBASE}/bin/nslookup
.include <bsd.port.options.mk>
@@ -149,6 +158,8 @@ post-patch:
@${REINPLACE_CMD} -e 's|setlocale (LC_ALL, "");|setlocale (LC_ALL, ""); setlocale(LC_NUMERIC, "C");|g' ${WRKSRC}/plugins/${file}
.endfor
@${REINPLACE_CMD} -e 's|chown root|${TRUE}|g' ${WRKSRC}/plugins-root/Makefile.am
+ # add a fake PATH so that it gets set to a correct value during build.
+ @${REINPLACE_CMD} -e "s|$$ENV{'PATH'}=''|$$ENV{'PATH'}='foo'|" ${WRKSRC}/plugins-scripts/*.pl
.if ${PORT_OPTIONS:MJAIL}
@${REINPLACE_CMD} -e 's# 127.0.0.1 # ${NAGIOSPOLLIP} #g' ${WRKSRC}/configure.ac
@${REINPLACE_CMD} -e 's# ::1 # ${NAGIOSPOLLIP6} #g' ${WRKSRC}/configure.ac
diff --git a/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in b/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in
index d6a7d1fd86bb..c080850b8028 100644
--- a/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in
+++ b/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in
@@ -1,5 +1,5 @@
--- ./plugins-scripts/subst.in.orig 2014-03-04 22:41:57.000000000 +0100
-+++ ./plugins-scripts/subst.in 2014-04-16 11:38:35.000000000 +0200
++++ ./plugins-scripts/subst.in 2014-05-09 18:08:34.000000000 +0200
@@ -1,7 +1,7 @@
#!/usr/bin/awk
@@ -18,3 +18,12 @@
c=substr($0,RSTART,RLENGTH);
sub(c,which(c,path));
}
+@@ -65,7 +65,7 @@
+ # Trusted path mechanism (deprecated)
+
+ /^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ {
+- sub(/\=[ \t]*['"][^"']+["']/,"='@with_trusted_path@' # autoconf-derived");
++ sub(/\=[ \t]*['"][^"']+["'];/,"='@with_trusted_path@'; # autoconf-derived");
+ }
+
+ /^[\t ]*(export[\t ]*)?PATH[\t ]*=['"]+.+["']$/ {