[Midnightbsd-cvs] mports [16115] trunk/sysutils/munin-node: fix a few problems

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Mar 24 10:04:50 EDT 2014


Revision: 16115
          http://svnweb.midnightbsd.org/mports/?rev=16115
Author:   laffer1
Date:     2014-03-24 10:04:49 -0400 (Mon, 24 Mar 2014)
Log Message:
-----------
fix a few problems

Modified Paths:
--------------
    trunk/sysutils/munin-node/Makefile
    trunk/sysutils/munin-node/files/munin-node.in
    trunk/sysutils/munin-node/files/munin-sched.in

Modified: trunk/sysutils/munin-node/Makefile
===================================================================
--- trunk/sysutils/munin-node/Makefile	2014-03-24 13:48:55 UTC (rev 16114)
+++ trunk/sysutils/munin-node/Makefile	2014-03-24 14:04:49 UTC (rev 16115)
@@ -2,6 +2,7 @@
 
 PORTNAME=	munin
 PORTVERSION=	${MUNIN_VERSION}
+PORTREVISION=	1
 CATEGORIES=	sysutils perl5
 MASTER_SITES=	${MUNIN_SITES}
 PKGNAMESUFFIX=	-node
@@ -15,13 +16,11 @@
 		p5-DateTime-HiRes>=0:${PORTSDIR}/devel/p5-DateTime-HiRes \
 		munin-common>=0:${PORTSDIR}/sysutils/munin-common \
 		p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \
-		p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP \
 		bash:${PORTSDIR}/shells/bash
 RUN_DEPENDS=	p5-Cache-Cache>=0:${PORTSDIR}/devel/p5-Cache-Cache \
 		p5-DateTime-HiRes>=0:${PORTSDIR}/devel/p5-DateTime-HiRes \
 		munin-common>=0:${PORTSDIR}/sysutils/munin-common \
 		p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \
-		p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP \
 		p5-Net-CIDR>=0:${PORTSDIR}/net-mgmt/p5-Net-CIDR \
 		bash:${PORTSDIR}/shells/bash
 
@@ -28,9 +27,10 @@
 DISTINFO_FILE=	${MUNIN_DISTINFO}
 EXTRA_PATCHES+=	${MUNIN_PATCHES}
 USE_PERL5=	yes
-USE_GMAKE=	yes
+USES=		gmake shebangfix
 PKGMESSAGE=	${WRKDIR}/pkg-message
 REINPLACE_ARGS=	-i ""
+SHEBANG_FILES=	node/sbin/munin-node
 
 .include "${.CURDIR}/../munin-common/munin.mk"
 
@@ -37,6 +37,17 @@
 ALL_TARGET=	build-node build-plugins
 INSTALL_TARGET=	install-node-prime install-plugins-prime
 
+OPTIONS_DEFINE=	SNMP
+OPTIONS_DEFAULT=	SNMP
+SNMP_DESC=	Include support for SNMP plugins
+
+.include <bsd.mport.options.mk>
+
+.if ${PORT_OPTIONS:MSNMP}
+BUILD_DEPENDS+=	p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
+RUN_DEPENDS+=	p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
+.endif
+
 MAN1=		munin-node-configure.1 \
 		munin-node.1 \
 		munin-run.1 \
@@ -73,6 +84,13 @@
 		${WRKSRC}/node/sbin/munin-node \
 		${WRKSRC}/node/sbin/munin-node-configure \
 		${WRKSRC}/node/sbin/munin-run
+	@${REINPLACE_CMD} \
+		-e 's|^\(BASH[[:space:]]*:=\).*|\1 ${bash_CMD}|' \
+		-e 's|^\(JAVARUN[[:space:]]*:=\).*|\1 ${java_CMD}|' \
+		-e 's|^\(PERL[[:space:]]*:=\).*|\1 ${perl_CMD}|' \
+		-e 's|^\(PYTHON[[:space:]]*:=\).*|\1 ${python_CMD}|' \
+		-e 's|^\(RUBY[[:space:]]*:=\).*|\1 ${ruby_CMD}|' \
+		${WRKSRC}/Makefile.config
 	@${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete
 	${CP} -r ${WRKSRC}/plugins/node.d.freebsd ${WRKSRC}/plugins/node.d.midnightbsd
 

Modified: trunk/sysutils/munin-node/files/munin-node.in
===================================================================
--- trunk/sysutils/munin-node/files/munin-node.in	2014-03-24 13:48:55 UTC (rev 16114)
+++ trunk/sysutils/munin-node/files/munin-node.in	2014-03-24 14:04:49 UTC (rev 16115)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD$
+# $MidnightBSD$
 #
 # PROVIDE: munin-node
 # REQUIRE: DAEMON
@@ -24,7 +24,7 @@
 : ${munin_node_config="%%PREFIX%%/etc/munin/munin-node.conf"}
 
 command="%%PREFIX%%/sbin/munin-node"
-command_interpreter="%%PREFIX%%/bin/perl"
+command_interpreter="/usr/bin/perl"
 start_precmd=find_pidfile
 status_precmd=find_pidfile
 stop_precmd=find_pidfile

Modified: trunk/sysutils/munin-node/files/munin-sched.in
===================================================================
--- trunk/sysutils/munin-node/files/munin-sched.in	2014-03-24 13:48:55 UTC (rev 16114)
+++ trunk/sysutils/munin-node/files/munin-sched.in	2014-03-24 14:04:49 UTC (rev 16115)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD$
+# $MidnightBSD$
 #
 # PROVIDE: munin-sched
 # REQUIRE: DAEMON



More information about the Midnightbsd-cvs mailing list