Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Aug 2009 09:27:22 GMT
From:      Svein Skogen <svein@stillbilde.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/137381: Minor patch for collectd Makefile allowing collection of UPS data via nut.
Message-ID:  <200908030927.n739RMR2009114@www.freebsd.org>
Resent-Message-ID: <200908030930.n739U4MB071250@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908030927.n739RMR2009114>