svn commit: r353472 - in head/net-mgmt/nagios-plugins: . files

Mathieu Arnold mat at FreeBSD.org
Fri May 9 16:23:42 UTC 2014


Author: mat
Date: Fri May  9 16:23:41 2014
New Revision: 353472
URL: http://svnweb.freebsd.org/changeset/ports/353472
QAT: https://qat.redports.org/buildarchive/r353472/

Log:
  - Fix check_mailq with qmail [1]
  - Add LICENSE
  - Fix a few occurences of /usr/local
  - USES=libtool
  - Add a backup MASTER_SITE.
  
  Reported by:	Filias Heidt [1]
  Sponsored by:	Absolight

Modified:
  head/net-mgmt/nagios-plugins/Makefile
  head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in

Modified: head/net-mgmt/nagios-plugins/Makefile
==============================================================================
--- head/net-mgmt/nagios-plugins/Makefile	Fri May  9 16:14:08 2014	(r353471)
+++ head/net-mgmt/nagios-plugins/Makefile	Fri May  9 16:23:41 2014	(r353472)
@@ -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 at 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=${NAG
 		--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}/d
 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

Modified: head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in
==============================================================================
--- head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in	Fri May  9 16:14:08 2014	(r353471)
+++ head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in	Fri May  9 16:23:41 2014	(r353472)
@@ -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 ]*=['"]+.+["']$/ {


More information about the svn-ports-all mailing list