Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2007 11:03:54 +1000 (YAKST)
From:      Alexander Logvinov <ports@logvinov.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        itetcu@FreeBSD.org
Subject:   ports/116774: [PATCH] sysutils/apcupsd: update to 3.14.2
Message-ID:  <200710010103.l9113skR071910@blg.akavia.ru>
Resent-Message-ID: <200710010110.l911A13h027216@freefall.freebsd.org>

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

>Number:         116774
>Category:       ports
>Synopsis:       [PATCH] sysutils/apcupsd: update to 3.14.2
>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:   Mon Oct 01 01:10:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Logvinov
>Release:        FreeBSD 6.2-RELEASE-p7 i386
>Organization:
>Environment:

>Description:

 Update to 3.14.2
 Add missing build depend on devel/makedepend
 Utilize ETCDIR for Makefile and pkg-plist
 Move pkg-message to FILESDIR
 No need to use USE_GETTEXT=yes, because port doesn't install any mo files
 and --enable-nls option doesn't help. With --with-included-gettext apcupsd
 doesn't build.
 

>How-To-Repeat:

# cd /usr/ports/sysutils/apcupsd
# make
...

Doing make of dependencies
Nothing to do for depend.
gmake[1]: Entering directory `/usr/ports/sysutils/apcupsd/work/apcupsd-3.14.1/src'
makedepend: not found
gmake[1]: *** [real-depend] Error 127
gmake[1]: Leaving directory `/usr/ports/sysutils/apcupsd/work/apcupsd-3.14.1/src'
gmake: *** [depend] Error 2
*** Error code 2

Stop in /usr/ports/sysutils/apcupsd/work/apcupsd-3.14.1.
(cd examples; /usr/local/bin/gmake clean)

>Fix:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/sysutils/apcupsd/Makefile,v
retrieving revision 1.52
diff -u -r1.52 Makefile
--- Makefile	23 Jul 2007 09:36:33 -0000	1.52
+++ Makefile	1 Oct 2007 00:29:21 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	apcupsd
-PORTVERSION=	3.14.1
+PORTVERSION=	3.14.2
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:S/$/:src_sf/g} \
 		http://sce-tindy.tecnik93.com/FreeBSD/ports/${PORTNAME}/sources/:src_bk \
@@ -21,14 +21,16 @@
 MAINTAINER=	itetcu@FreeBSD.org
 COMMENT=	A daemon for controlling APC UPS
 
-USE_GETTEXT=	yes
+BUILD_DEPENDS=	makedepend:${PORTSDIR}/devel/makedepend
+
 USE_RC_SUBR=	apcupsd
+SUB_FILES=	pkg-message
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--sbindir=${PREFIX}/sbin \
 		--with-nologin=/var/run \
 		--disable-install-distdir \
-		--sysconfdir=${PREFIX}/etc/apcupsd \
+		--sysconfdir=${ETCDIR} \
 		--with-serial-dev=/dev/usv
 
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
@@ -51,7 +53,7 @@
 .endif
 
 .if defined(WITH_CGI)
-CONFIGURE_ARGS+=	--enable-cgi --with-cgi-bin=${PREFIX}/etc/apcupsd/cgi
+CONFIGURE_ARGS+=	--enable-cgi --with-cgi-bin=${ETCDIR}/cgi
 LIB_DEPENDS+=		gd.4:${PORTSDIR}/graphics/gd
 PLIST_SUB+=		CGI=""
 .else
@@ -79,21 +81,21 @@
 #	the package list. So the port could be removed without problems
 	for na in apccontrol commfailure mainsback mastertimeout \
 		  changeme commok masterconnect onbattery; do \
-		if [ -f ${PREFIX}/etc/apcupsd/$$na.orig ]; then \
-			if cmp -s ${PREFIX}/etc/apcupsd/$$na ${PREFIX}/etc/apcupsd/$$na.orig; then \
-				${ECHO_CMD} "etc/apcupsd/$$na.orig" >> ${TMPPLIST}; \
+		if [ -f ${ETCDIR}/$$na.orig ]; then \
+			if cmp -s ${ETCDIR}/$$na ${ETCDIR}/$$na.orig; then \
+				${ECHO_CMD} "%%ETCDIR%%/$$na.orig" >> ${TMPPLIST}; \
 			fi \
 		fi; \
 	done
-	@${ECHO_CMD} "@unexec if [ -d %D/etc/apcupsd ]; then ${ECHO_CMD} \"If you are permanently removing this port, you should do a ``rm -rf ${PREFIX}/etc/apcupsd`` to remove config files left.\" | ${FMT} ; fi" >> ${TMPPLIST}
+	@${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 ${PREFIX}/etc/apcupsd/$$na ]; then \
-			if [ -f ${PREFIX}/etc/apcupsd/$$na.new ]; then \
-				${MV} ${PREFIX}/etc/apcupsd/$$na.new ${PREFIX}/etc/apcupsd/$$na.sample; \
+		if [ -f ${ETCDIR}/$$na ]; then \
+			if [ -f ${ETCDIR}/$$na.new ]; then \
+				${MV} ${ETCDIR}/$$na.new ${ETCDIR}/$$na.sample; \
 			else \
-				${CP} ${PREFIX}/etc/apcupsd/$$na ${PREFIX}/etc/apcupsd/$$na.sample; \
+				${CP} ${ETCDIR}/$$na ${ETCDIR}/$$na.sample; \
 			fi; \
 		fi; \
 	done
@@ -101,5 +103,6 @@
 	@${MKDIR} ${DOCSDIR}
 	cd ${DISTDIR} && ${INSTALL_DATA} ${PORTNAME}.pdf ${DOCSDIR}
 .endif
+	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/sysutils/apcupsd/distinfo,v
retrieving revision 1.20
diff -u -r1.20 distinfo
--- distinfo	12 Jun 2007 19:39:21 -0000	1.20
+++ distinfo	1 Oct 2007 00:29:21 -0000
@@ -1,5 +1,5 @@
-MD5 (apcupsd-3.14.1.tar.gz) = 258eb7515a12de493bb8952bc6d2f4e1
-SHA256 (apcupsd-3.14.1.tar.gz) = 3d68ce2c387194a8d6d2afae40dbaa0c02a87992ac1bdbd2495b1b610266c123
-SIZE (apcupsd-3.14.1.tar.gz) = 4352400
+MD5 (apcupsd-3.14.2.tar.gz) = fd8785e7607d20cefa68dc20e44eebc4
+SHA256 (apcupsd-3.14.2.tar.gz) = 72605e54356ffe32dc24159b4094a5b7e5e978d2440edded8b01496af9caca50
+SIZE (apcupsd-3.14.2.tar.gz) = 4345034
 MD5 (apcupsd.pdf) = IGNORE
 SHA256 (apcupsd.pdf) = IGNORE
Index: pkg-message
===================================================================
RCS file: pkg-message
diff -N pkg-message
--- pkg-message	1 May 2006 14:35:47 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-**********************************************************************
-Read the manual
-
-  ${PREFIX}/share/doc/apcupsd/manual.pdf
-
-to do site specific configuration assigenments! Especially have a
-detailed look into the chapter describing the shutdown procedure.
-
-Sample files are installed in ${PREFIX}/etc/apcupsd. These files
-must be copied and/or configured for a proper working apcupsd.
-You need to modify ${PREFIX}/etc/apcupsd/apcupsd.conf as follows:
-
-  For serial cable: DEVICE /dev/cuadX (or /dev/cuaaX for [45.]x) 
-  For USB cable: DEVICE (yes, leave it blank after DEVICE)
-
-NOTE that for USB cable you must comment out the line
-
-  device         uhid            # "Human Interface Devices"
-
-in your kernel configuration file and recompile the kernel.
-Your keyboard and mouse will still work.
-
-WARNING USB support on FreeBSD is still considered BETA!
-
-Add apcupsd_enable=YES to your /etc/rc.conf[.local] to have apcupsd
-starting up at boot time.
-
-**********************************************************************
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/sysutils/apcupsd/pkg-plist,v
retrieving revision 1.20
diff -u -r1.20 pkg-plist
--- pkg-plist	5 Apr 2007 19:57:25 -0000	1.20
+++ pkg-plist	1 Oct 2007 00:29:21 -0000
@@ -3,23 +3,23 @@
 sbin/apctest
 sbin/smtp
 %%POWERFL%%sbin/powerflute
-@unexec if cmp -s %D/etc/apcupsd/apcupsd.conf.sample %D/etc/apcupsd/apcupsd.conf; then rm -f %D/etc/apcupsd/apcupsd.conf; fi
-etc/apcupsd/apcupsd.conf.sample
-etc/apcupsd/apccontrol
-etc/apcupsd/changeme
-etc/apcupsd/commfailure
-etc/apcupsd/commok
-etc/apcupsd/onbattery
-etc/apcupsd/offbattery
-%%CGI%%@unexec if cmp -s %D/etc/apcupsd/apcupsd.css.sample %D/etc/apcupsd/apcupsd.css; then rm -f %D/etc/apcupsd/apcupsd.css; fi
-%%CGI%%etc/apcupsd/apcupsd.css.sample
-%%CGI%%@unexec if cmp -s %D/etc/apcupsd/hosts.conf.sample %D/etc/apcupsd/hosts.conf; then rm -f %D/etc/apcupsd/hosts.conf; fi
-%%CGI%%etc/apcupsd/hosts.conf.sample
-%%CGI%%@unexec if cmp -s %D/etc/apcupsd/multimon.conf.sample %D/etc/apcupsd/multimon.conf; then rm -f %D/etc/apcupsd/multimon.conf; fi
-%%CGI%%etc/apcupsd/multimon.conf.sample
-%%CGI%%etc/apcupsd/cgi/multimon.cgi
-%%CGI%%etc/apcupsd/cgi/upsfstats.cgi
-%%CGI%%etc/apcupsd/cgi/upsimage.cgi
-%%CGI%%etc/apcupsd/cgi/upsstats.cgi
-%%CGI%%@dirrm etc/apcupsd/cgi
-@dirrmtry etc/apcupsd
+@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
+%%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%%@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%%@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%%%%ETCDIR%%/cgi/multimon.cgi
+%%CGI%%%%ETCDIR%%/cgi/upsfstats.cgi
+%%CGI%%%%ETCDIR%%/cgi/upsimage.cgi
+%%CGI%%%%ETCDIR%%/cgi/upsstats.cgi
+%%CGI%%@dirrm %%ETCDIR%%/cgi
+@dirrmtry %%ETCDIR%%
Index: files/apcupsd.in
===================================================================
RCS file: /home/pcvs/ports/sysutils/apcupsd/files/apcupsd.in,v
retrieving revision 1.2
diff -u -r1.2 apcupsd.in
--- files/apcupsd.in	24 Apr 2006 03:26:54 -0000	1.2
+++ files/apcupsd.in	1 Oct 2007 00:29:21 -0000
@@ -28,7 +28,7 @@
 : ${apcupsd_lockfile="/var/spool/lock/apcupsd.lock"}
 
 pidfile="/var/run/apcupsd.pid"
-required_files="%%PREFIX%%/etc/apcupsd/apcupsd.conf"
+required_files="%%ETCDIR%%/apcupsd.conf"
 command="%%PREFIX%%/sbin/apcupsd"
 
 run_rc_command "$1"
Index: files/pkg-message.in
===================================================================
RCS file: files/pkg-message.in
diff -N files/pkg-message.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/pkg-message.in	1 Oct 2007 00:29:21 -0000
@@ -0,0 +1,28 @@
+**********************************************************************
+Read the manual
+
+  %%DOCSDIR%%/manual.pdf
+
+to do site specific configuration assigenments! Especially have a
+detailed look into the chapter describing the shutdown procedure.
+
+Sample files are installed in %%ETCDIR%%. These files
+must be copied and/or configured for a proper working apcupsd.
+You need to modify %%ETCDIR%%/apcupsd.conf as follows:
+
+  For serial cable: DEVICE /dev/cuadX (or /dev/cuaaX for [45.]x) 
+  For USB cable: DEVICE (yes, leave it blank after DEVICE)
+
+NOTE that for USB cable you must comment out the line
+
+  device         uhid            # "Human Interface Devices"
+
+in your kernel configuration file and recompile the kernel.
+Your keyboard and mouse will still work.
+
+WARNING USB support on FreeBSD is still considered BETA!
+
+Add apcupsd_enable=YES to your /etc/rc.conf[.local] to have apcupsd
+starting up at boot time.
+
+**********************************************************************
>Release-Note:
>Audit-Trail:
>Unformatted:



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