Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2014 14:17:41 -0300
From:      "Danilo G. Baio" <dbaio@bsd.com.br>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/188464: [PATCH] sysutils/apcupsd: update to 3.14.12
Message-ID:  <534823b9.454be00a.40ba.ffff8bb2@mx.google.com>
Resent-Message-ID: <201404111720.s3BHK1Gp047533@freefall.freebsd.org>

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

>Number:         188464
>Category:       ports
>Synopsis:       [PATCH] sysutils/apcupsd: update to 3.14.12
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 11 17:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Danilo G. Baio
>Release:        FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD dbaio.bs2cloud.com.br 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC
>Description:
- Update to 3.14.12
- Added Stage support
- Added license
- Modified Makefile (Uses / Options_Sub )
- Modified LIB_DEPENDS to the new format
- Modified the Installer of Confs and Samples

Redports build status:
https://redports.org/buildarchive/20140411162324-62084/

Port maintainer (itetcu@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 1.00.2014.03.23 (mode: update, diff: SVN)
>How-To-Repeat:
>Fix:

--- apcupsd-3.14.12.patch begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 351014)
+++ Makefile	(working copy)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	apcupsd
-PORTVERSION=	3.14.10
-PORTREVISION=	1
+PORTVERSION=	3.14.12
 CATEGORIES=	sysutils
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}%20-%20Stable/${PORTVERSION}:src_sf \
 		http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/:src_bk \
@@ -16,13 +15,13 @@
 MAINTAINER=	itetcu@FreeBSD.org
 COMMENT=	Set of programs for controlling APC UPS
 
-IGNOREFILES=	${PORTNAME}.pdf
+LICENSE=	GPLv2
 
 USE_RC_SUBR=	apcupsd
 SUB_FILES=	pkg-message
 
 GNU_CONFIGURE=	yes
-USE_GMAKE=	yes
+USES=	gmake
 CONFIGURE_ARGS=	--sbindir=${PREFIX}/sbin \
 		--with-nologin=/var/run \
 		--disable-install-distdir \
@@ -29,15 +28,13 @@
 		--sysconfdir=${ETCDIR} \
 		--with-serial-dev=/dev/usv
 
-CONFIGURE_ENV+= LD="${CXX}" 
-#CONFIGURE_ENV+=	LIBS="-lstdc++"
+CONFIGURE_ENV+=	LD="${CXX}"
+CONFIGURE_ENV+=	SHUTDOWN="/sbin/shutdown"
+CONFIGURE_ENV+=	LIBS="-lstdc++"
 CPPFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
 LDFLAGS+=	-L${LOCALBASE}/lib
 CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
 
-MAN5=		apcupsd.conf.5
-MAN8=		apcaccess.8 apccontrol.8 apctest.8 apcupsd.8
-
 OPTIONS_DEFINE=	APCSMART_DRV APCDUMB_DRV CLIENT_ONLY CGI PCNET_DRV USB SNMP_DRV \
 		SNMP_DRV_OLD TCP_WRAPPERS TEST_DRV GAPCMON DOCS
 OPTIONS_DEFAULT=	APCSMART_DRV APCDUMB_DRV PCNET_DRV USB TCP_WRAPPERS
@@ -53,86 +50,46 @@
 TEST_DRV_DESC=		Compile TEST driver
 GAPCMON_DESC=		Build GTK GUI front-end
 
+OPTIONS_SUB=	yes
+
 PORTDOCS=	${PORTNAME}.pdf
+IGNOREFILES=	${PORTNAME}.pdf
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
+APCSMART_DRV_CONFIGURE_ENABLE=	apcsmart
 
-.if ${PORT_OPTIONS:MAPCSMART_DRV}
-CONFIGURE_ARGS+=	--enable-apcsmart
-.else
-CONFIGURE_ARGS+=	--disable-apcsmart
-.endif
+APCDUMB_DRV_CONFIGURE_ENABLE=	dumb
 
-.if ${PORT_OPTIONS:MAPCDUMB_DRV}
-CONFIGURE_ARGS+=	--enable-dumb
-.else
-CONFIGURE_ARGS+=	--disable-dumb
-.endif
+CLIENT_ONLY_CONFIGURE_ON=	--enable-net \
+				--disable-apcsmart --disable-dumb --disable-usb \
+				--disable-snmp --disable-test --disable-pcnet
 
-.if ${PORT_OPTIONS:MCLIENT_ONLY}
-CONFIGURE_ARGS+=	--enable-net \
-			--disable-apcsmart --disable-dumb --disable-usb \
-			--disable-snmp --disable-test --disable-pcnet
-.endif
+CGI_CONFIGURE_ON=	--enable-cgi --with-cgi-bin=${ETCDIR}/cgi
+CGI_LIB_DEPENDS=	libgd.so:${PORTSDIR}/graphics/gd
 
-.if ${PORT_OPTIONS:MCGI}
-CONFIGURE_ARGS+=	--enable-cgi --with-cgi-bin=${ETCDIR}/cgi
-LIB_DEPENDS+=		gd:${PORTSDIR}/graphics/gd
-PLIST_SUB+=		CGI=""
-.else
-PLIST_SUB+=		CGI="@comment "
-.endif
+GAPCMON_CONFIGURE_ENABLE=	gapcmon
+GAPCMON_USE=		GNOME=gconf2
+GAPCMON_CONFLICTS=	gapcmon-[0-9]*
 
-.if ${PORT_OPTIONS:MGAPCMON}
-CONFIGURE_ARGS+=	--enable-gapcmon
-USE_GNOME+=		gconf2
-PLIST_SUB+=		GAPCMON=""
-CONFLICTS+=		gapcmon-[0-9]*
-.else
-PLIST_SUB+=		GAPCMON="@comment "
-.endif
+PCNET_DRV_CONFIGURE_ENABLE=	pcnet
 
-.if ${PORT_OPTIONS:MPCNET_DRV}
-CONFIGURE_ARGS+=	--enable-pcnet
-.else
-CONFIGURE_ARGS+=	--disable-pcnet
-.endif
+USB_CONFIGURE_ENABLE=	usb
 
-.if ${PORT_OPTIONS:MUSB}
-CONFIGURE_ARGS+=	--enable-usb
-.endif
+SNMP_DRV_CONFIGURE_ENABLE=	snmp
 
-.if ${PORT_OPTIONS:MSNMP_DRV}
-CONFIGURE_ARGS+=	--enable-snmp
-.else
-CONFIGURE_ARGS+=	--disable-snmp
-.endif
+SNMP_DRV_OLD_CONFIGURE_ENABLE=	net-snmp
+SNMP_DRV_OLD_LIB_DEPENDS=	libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp
 
-.if ${PORT_OPTIONS:MSNMP_DRV_OLD}
-LIB_DEPENDS+=		netsnmp.30:${PORTSDIR}/net-mgmt/net-snmp
-CONFIGURE_ARGS+=	--enable-net-snmp
-.else
-CONFIGURE_ARGS+=	--disable-net-snmp
-.endif
+TCP_WRAPPERS_CONFIGURE_ON=	--with-libwrap=yes
 
-.if ${PORT_OPTIONS:MTCP_WRAPPERS}
-CONFIGURE_ARGS+=	--with-libwrap=yes
-.endif
+TEST_DRV_CONFIGURE_ENABLE=	test
 
-.if ${PORT_OPTIONS:MTEST_DRV}
-CONFIGURE_ARGS+=	--enable-test
-.endif
+.include <bsd.port.options.mk>
 
-#CONFIGURE_ARGS+=	--with-libwrap=yes
-#CONFIGURE_ENV+=		LIBS="-lcurses -lmenu"
-#PLIST_SUB+=		POWERFL=""
-
 pre-configure:
 .if ${PORT_OPTIONS:MCLIENT_ONLY} && ( ${PORT_OPTIONS:MAPCSMART_DRV} || \
 	${PORT_OPTIONS:MAPCDUMB_DRV} || ${PORT_OPTIONS:MPCNET_DRV} || \
-	${PORT_OPTIONS:MPOWERFLUTE} || ${PORT_OPTIONS:MUSB} || \
-	${PORT_OPTIONS:MSNMP_DRV} || ${PORT_OPTIONS:MTEST_DRV} )
+	${PORT_OPTIONS:MUSB} || ${PORT_OPTIONS:MSNMP_DRV} || \
+	${PORT_OPTIONS:MTEST_DRV} )
 	@${ECHO_CMD} "It doesn't make sense to build drivers if all you want is"
 	@${ECHO_CMD} "the client; please do make config and select either"
 	@${ECHO_CMD} "CLIENT_ONLY or the *_DRV you need"
@@ -140,32 +97,19 @@
 .endif
 
 post-install:
-#	If the files presaved are identical with the new one, include them in
-#	the package list, so the port can be removed without problems
-	for na in apccontrol commfailure mainsback mastertimeout \
-		  changeme commok masterconnect onbattery; do \
-		if [ -f ${ETCDIR}/$$na.orig ]; then \
-			if cmp -s ${ETCDIR}/$$na ${ETCDIR}/$$na.orig; then \
-				${ECHO_CMD} "%%ETCDIR%%/$$na.orig" >> ${TMPPLIST}; \
-			fi \
-		fi; \
+	for na in apccontrol changeme commfailure commok offbattery onbattery; do \
+		${MV} ${STAGEDIR}${ETCDIR}/$$na ${STAGEDIR}${ETCDIR}/$$na.sample; \
 	done
+	@${MV} ${STAGEDIR}${ETCDIR}/apcupsd.conf ${STAGEDIR}${ETCDIR}/apcupsd.conf.sample
+.if ${PORT_OPTIONS:MCGI}
+		for na in apcupsd.css hosts.conf multimon.conf; do \
+			${MV} ${STAGEDIR}${ETCDIR}/$$na ${STAGEDIR}${ETCDIR}/$$na.sample; \
+		done
+.endif
 	@${ECHO_CMD} "@unexec if [ -d %D/${ETCDIR_REL} ]; then ${ECHO_CMD} \"If you are permanently removing this port, you should do a ``rm -rf ${ETCDIR}`` to remove config files left.\" | ${FMT} ; fi" >> ${TMPPLIST}
-#	Install sample startup script
-#	If there is already a config file it is installed as ...new
-	for na in apcupsd.conf apcupsd.css hosts.conf multimon.conf; do \
-		if [ -f ${ETCDIR}/$$na ]; then \
-			if [ -f ${ETCDIR}/$$na.new ]; then \
-				${MV} ${ETCDIR}/$$na.new ${ETCDIR}/$$na.sample; \
-			else \
-				${CP} ${ETCDIR}/$$na ${ETCDIR}/$$na.sample; \
-			fi; \
-		fi; \
-	done
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}.pdf ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}.pdf ${STAGEDIR}${DOCSDIR}
 .endif
-	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
--- distinfo	(revision 351014)
+++ distinfo	(working copy)
@@ -1,3 +1,3 @@
-SHA256 (apcupsd-3.14.10.tar.gz) = 0707b5ec9916fbde9e44eb8d18037c8d8f75dfd6aeef51aba5487e189eef2032
-SIZE (apcupsd-3.14.10.tar.gz) = 1336852
+SHA256 (apcupsd-3.14.12.tar.gz) = 1b4f703cb19cfdf44daf173dc8394cafd30fee0b30a0c75a7d19db622454a440
+SIZE (apcupsd-3.14.12.tar.gz) = 2014699
 SHA256 (apcupsd.pdf) = IGNORE
Index: pkg-descr
===================================================================
--- pkg-descr	(revision 351014)
+++ pkg-descr	(working copy)
@@ -4,4 +4,4 @@
 automatic shutdown, and can run in network mode in order to power down
 other hosts on a LAN
 
-WWW:  http://www.apcupsd.com
+WWW: http://www.apcupsd.com
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 351014)
+++ pkg-plist	(working copy)
@@ -4,18 +4,34 @@
 sbin/smtp
 @unexec if cmp -s %D/%%ETCDIR%%/apcupsd.conf.sample %D/%%ETCDIR%%/apcupsd.conf; then rm -f %D/%%ETCDIR%%/apcupsd.conf; fi
 %%ETCDIR%%/apcupsd.conf.sample
-%%ETCDIR%%/apccontrol
-%%ETCDIR%%/changeme
-%%ETCDIR%%/commfailure
-%%ETCDIR%%/commok
-%%ETCDIR%%/onbattery
-%%ETCDIR%%/offbattery
+@exec if [ ! -f %D/%%ETCDIR%%/apcupsd.conf ] ; then cp -p %D/%%ETCDIR%%/apcupsd.conf.sample %D/%%ETCDIR%%/apcupsd.conf; fi
+@unexec if cmp -s %D/%%ETCDIR%%/apccontrol.sample %D/%%ETCDIR%%/apccontrol; then rm -f %D/%%ETCDIR%%/apccontrol; fi
+%%ETCDIR%%/apccontrol.sample
+@exec if [ ! -f %D/%%ETCDIR%%/apccontrol ] ; then cp -p %D/%%ETCDIR%%/apccontrol.sample %D/%%ETCDIR%%/apccontrol; fi
+@unexec if cmp -s %D/%%ETCDIR%%/changeme.sample %D/%%ETCDIR%%/changeme; then rm -f %D/%%ETCDIR%%/changeme; fi
+%%ETCDIR%%/changeme.sample
+@exec if [ ! -f %D/%%ETCDIR%%/changeme ] ; then cp -p %D/%%ETCDIR%%/changeme.sample %D/%%ETCDIR%%/changeme; fi
+@unexec if cmp -s %D/%%ETCDIR%%/commfailure.sample %D/%%ETCDIR%%/commfailure; then rm -f %D/%%ETCDIR%%/commfailure; fi
+%%ETCDIR%%/commfailure.sample
+@exec if [ ! -f %D/%%ETCDIR%%/commfailure ] ; then cp -p %D/%%ETCDIR%%/commfailure.sample %D/%%ETCDIR%%/commfailure; fi
+@unexec if cmp -s %D/%%ETCDIR%%/commok.sample %D/%%ETCDIR%%/commok; then rm -f %D/%%ETCDIR%%/commok; fi
+%%ETCDIR%%/commok.sample
+@exec if [ ! -f %D/%%ETCDIR%%/commok ] ; then cp -p %D/%%ETCDIR%%/commok.sample %D/%%ETCDIR%%/commok; fi
+@unexec if cmp -s %D/%%ETCDIR%%/onbattery.sample %D/%%ETCDIR%%/onbattery; then rm -f %D/%%ETCDIR%%/onbattery; fi
+%%ETCDIR%%/onbattery.sample
+@exec if [ ! -f %D/%%ETCDIR%%/onbattery ] ; then cp -p %D/%%ETCDIR%%/onbattery.sample %D/%%ETCDIR%%/onbattery; fi
+@unexec if cmp -s %D/%%ETCDIR%%/offbattery.sample %D/%%ETCDIR%%/offbattery; then rm -f %D/%%ETCDIR%%/offbattery; fi
+%%ETCDIR%%/offbattery.sample
+@exec if [ ! -f %D/%%ETCDIR%%/offbattery ] ; then cp -p %D/%%ETCDIR%%/offbattery.sample %D/%%ETCDIR%%/offbattery; fi
 %%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/apcupsd.css.sample %D/%%ETCDIR%%/apcupsd.css; then rm -f %D/%%ETCDIR%%/apcupsd.css; fi
 %%CGI%%%%ETCDIR%%/apcupsd.css.sample
+%%CGI%%@exec if [ ! -f %D/%%ETCDIR%%/apcupsd.css ] ; then cp -p %D/%%ETCDIR%%/apcupsd.css.sample %D/%%ETCDIR%%/apcupsd.css; fi
 %%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/hosts.conf.sample %D/%%ETCDIR%%/hosts.conf; then rm -f %D/%%ETCDIR%%/hosts.conf; fi
 %%CGI%%%%ETCDIR%%/hosts.conf.sample
+%%CGI%%@exec if [ ! -f %D/%%ETCDIR%%/hosts.conf ] ; then cp -p %D/%%ETCDIR%%/hosts.conf.sample %D/%%ETCDIR%%/hosts.conf; fi
 %%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/multimon.conf.sample %D/%%ETCDIR%%/multimon.conf; then rm -f %D/%%ETCDIR%%/multimon.conf; fi
 %%CGI%%%%ETCDIR%%/multimon.conf.sample
+%%CGI%%@exec if [ ! -f %D/%%ETCDIR%%/multimon.conf ] ; then cp -p %D/%%ETCDIR%%/multimon.conf.sample %D/%%ETCDIR%%/multimon.conf; fi
 %%CGI%%%%ETCDIR%%/cgi/multimon.cgi
 %%CGI%%%%ETCDIR%%/cgi/upsfstats.cgi
 %%CGI%%%%ETCDIR%%/cgi/upsimage.cgi
@@ -29,4 +45,9 @@
 %%GAPCMON%%share/pixmaps/onbatt.png
 %%GAPCMON%%share/pixmaps/online.png
 %%GAPCMON%%share/pixmaps/unplugged.png
+man/man5/apcupsd.conf.5.gz
+man/man8/apcaccess.8.gz
+man/man8/apccontrol.8.gz
+man/man8/apctest.8.gz
+man/man8/apcupsd.8.gz
 @dirrmtry %%ETCDIR%%
--- apcupsd-3.14.12.patch ends here ---

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?534823b9.454be00a.40ba.ffff8bb2>