ports/137381: Minor patch for collectd Makefile allowing collection of UPS data via nut.

Svein Skogen svein at stillbilde.net
Mon Aug 3 09:30:04 UTC 2009


>Number:         137381
>Category:       ports
>Synopsis:       Minor patch for collectd Makefile allowing collection of UPS data via nut.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 03 09:30:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Svein Skogen
>Release:        RELENG_7
>Organization:
>Environment:
FreeBSD newstore.stillbilde.net 7.2-STABLE FreeBSD 7.2-STABLE #0: Fri Jul  3 14:48:54 CEST 2009     svein at newstore.stillbilde.net:/usr/obj/usr/src/sys/VMWARE-amd64  amd64

>Description:
Currently collectd is made disabling its build in collection target from nut. This change to the ports Makefile makes this a tunable. It has been discussed with the port-maint and he advised me to send-pr the patch.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- Makefile	2009-01-23 16:43:05.000000000 +0100
+++ Makefile.new	2009-08-03 10:58:39.000000000 +0200
@@ -23,6 +23,7 @@
 		DEBUG	"Enable debugging" Off \
 		APACHE	"Input: Apache mod_status (libcurl)" Off \
 		APCUPS	"Input: APC UPS (apcupsd)" Off \
+		NUTUPS	"Input: NUT UPS daemon" Off \
 		INTERFACE "Input: Network interfaces (libstatgrab)" On \
 		MBMON	"Input: MBMon" Off \
 		MYSQL	"Input: MySQL" Off \
@@ -115,6 +116,15 @@
 PLIST_SUB+=	APCUPS="@comment "
 .endif
 
+.if defined(WITH_NUTUPS)
+CONFIGURE_ARGS+=--enable-nut
+BUILD_DEPENDS+=	${LOCALBASE}/include/upsclient.h:${PORTSDIR}/sysutils/nut
+PLIST_SUB+=	NUTUPS=""
+.else
+CONFIGURE_ARGS+=--disable-nut
+PLIST_SUB+=	NUTUPS="@comment "
+.endif
+
 .if defined(WITH_INTERFACE)
 BUILD_DEPENDS+=	pkg-config:${PORTSDIR}/devel/pkg-config
 CONFIGURE_ARGS+=--enable-interface
@@ -181,6 +191,11 @@
 PLIST_SUB+=	XMMS="@comment "
 .endif
 
+pre-everything::
+.if defined(WITH_NUTUPS) && !exists(/usr/local/include/upsclient.h)
+	@${ECHO_MSG} "need to build nut with WITH_DEVEL=yes"
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} \
 		-e 's;@prefix@/var/;/var/;' \


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list