From 2ced1f27a216ff6567970431d572824ad5034e1f Mon Sep 17 00:00:00 2001 From: jlam Date: Sat, 5 Aug 2000 07:31:15 +0000 Subject: Update apcupsd to 3.6.2. Package provided by Greg Woods in pkg/10552. Changes from version 3.5.8: Network is fully functional under non-threaded compile. Possible fix for "pipe_master_status" calls on slaves. Added 940-1524C smart signal cable support. Added internationalization support. There is _only_ the support but no current code is written for the intl package. It can be compiled in, but intl strings have still to be translated (to be done in the future). Added new configuration options to reduce init time of daemon. powersc CONFIG powersc NAME powersc BATTERY Fixes a FIFO error --- sysutils/apcupsd/Makefile | 89 +++++++++++++++------- sysutils/apcupsd/files/apcupsd | 43 +++++++++++ sysutils/apcupsd/files/md5 | 4 +- sysutils/apcupsd/files/patch-sum | 21 +++--- sysutils/apcupsd/patches/patch-aa | 152 +++++++++++++++++++++++++------------- sysutils/apcupsd/patches/patch-ab | 51 +++++++++---- sysutils/apcupsd/patches/patch-ac | 49 +++++++----- sysutils/apcupsd/patches/patch-ad | 113 ++++++++++++++++++++++++---- sysutils/apcupsd/patches/patch-ae | 126 ++++++++++++++----------------- sysutils/apcupsd/patches/patch-af | 80 +++++++++++++------- sysutils/apcupsd/patches/patch-ag | 76 +++++++++++++++---- sysutils/apcupsd/patches/patch-ah | 91 +++++------------------ sysutils/apcupsd/patches/patch-ai | 126 +++++-------------------------- sysutils/apcupsd/patches/patch-aj | 26 ------- sysutils/apcupsd/pkg/MESSAGE | 7 ++ sysutils/apcupsd/pkg/PLIST | 12 ++- 16 files changed, 609 insertions(+), 457 deletions(-) create mode 100644 sysutils/apcupsd/files/apcupsd delete mode 100644 sysutils/apcupsd/patches/patch-aj create mode 100644 sysutils/apcupsd/pkg/MESSAGE (limited to 'sysutils/apcupsd') diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile index 674273254a0..c378cce7860 100644 --- a/sysutils/apcupsd/Makefile +++ b/sysutils/apcupsd/Makefile @@ -1,29 +1,66 @@ -# $NetBSD: Makefile,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $ +# $NetBSD: Makefile,v 1.2 2000/08/05 07:31:15 jlam Exp $ # -DISTNAME= apcupsd-3.5.8.src -PKGNAME= apcupsd-3.5.8 -CATEGORIES= sysutils -MASTER_SITES= ftp://sunsite.unc.edu/pub/linux/system/ups/ - -MAINTAINER= bouyer@netbsd.org -HOMEPAGE= http://www.brisse.dk/site/apcupsd/ - -USE_GMAKE= yes - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/apcupsd-netbsd ${PREFIX}/sbin/apcupsd - ${INSTALL_PROGRAM} ${WRKSRC}/apcaccess-netbsd ${PREFIX}/bin/apcaccess - ${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${WRKSRC}/installs/powersc > \ - ${WRKDIR}/powersc - ${INSTALL_SCRIPT} ${WRKDIR}/powersc ${PREFIX}/sbin/ - ${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${WRKSRC}/installs/apcupsd.conf > \ - ${WRKDIR}/apcupsd.conf.sample - ${INSTALL_DATA} ${WRKDIR}/apcupsd.conf.sample ${PREFIX}/etc/ - @${MKDIR} ${PREFIX}/share/doc/apcupsd - ${INSTALL_DATA} ${WRKSRC}/readmes/README* \ - ${WRKSRC}/readmes/minicom.apcupsd ${PREFIX}/share/doc/apcupsd/ - ${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${WRKSRC}/docs/apcupsd.man8 > \ - ${WRKDIR}/apcupsd.8 - ${INSTALL_MAN} ${WRKDIR}/apcupsd.8 ${PREFIX}/man/man8/ +DISTNAME= apcupsd-3.6.2 +CATEGORIES= sysutils +MASTER_SITES= http://www.brisse.dk/dlarea/ + +MAINTAINER= bouyer@netbsd.org +HOMEPAGE= http://www.brisse.dk/site/apcupsd/ + +BUILD_DEPENDS+= autoreconf:../../devel/autoconf +DEPENDS+= gettext>=0.10.35nb1:../../devel/gettext + +USE_GMAKE= # defined + +GNU_CONFIGURE= # defined +CONFIGURE_ARGS+= --enable-http # include http support + +# Thread support is needed to compile powerflute, which has a curses interface +# +#DEPENDS+= ncurses-*:../../devel/ncurses +#CONFIGURE_ARGS+= --enable-threads # compile threading code +#CONFIGURE_ARGS+= --enable-powerflute # compile powerflute program + +CONFIGURE_ARGS+= --with-catgets # use catgets functions +CONFIGURE_ARGS+= --enable-nls # i18n support +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" +CPPFLAGS+= -I${LOCALBASE}/include # libintl.h +CFLAGS+= -I${LOCALBASE}/include # libintl.h + +pre-configure: + cd ${WRKSRC} && autoreconf --force + +# we should probably allow the tty to be set in /etc/mk.conf too +# +post-build: + ${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${WRKSRC}/examples/apcupsd.conf > \ + ${WRKDIR}/apcupsd.conf + ${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${FILESDIR}/apcupsd > \ + ${WRKDIR}/apcupsd + ${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${WRKSRC}/doc/apcupsd.man > \ + ${WRKSRC}/doc/apcupsd.8 + +DOCS= README.BackUPS-Pro \ + README.NEW \ + README.NewerBackUPS-Pro \ + README.Share-UPS \ + README.SmartUPS-VS \ + README.apcaccess \ + README.autoconfig \ + README.cable \ + README.developers \ + Statement.APCC \ + minicom.apcupsd \ + port.gif + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples + ${INSTALL_DATA} ${WRKDIR}/apcupsd.conf ${PREFIX}/share/examples + ${INSTALL_SCRIPT} ${WRKDIR}/apcupsd ${PREFIX}/etc/rc.d + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/apcupsd +.for file in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/doc/apcupsd +.endfor + .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/apcupsd/files/apcupsd b/sysutils/apcupsd/files/apcupsd new file mode 100644 index 00000000000..f8f9c75ea40 --- /dev/null +++ b/sysutils/apcupsd/files/apcupsd @@ -0,0 +1,43 @@ +#! /bin/sh +# +# $NetBSD: apcupsd,v 1.1 2000/08/05 07:31:16 jlam Exp $ +# +# PROVIDE: apcupsd +# REQUIRE: DAEMON + +name="apcupsd" +command="@@PREFIX@@/sbin/powersc" +pidfile="/var/run/${name}.pid" + +cmd=${1:-start} + +case ${cmd} in +start) + if [ -x ${command} ]; then + echo "Starting ${name}." + ${command} INIT + fi + ;; +stop) + if [ -f ${pidfile} ]; then + pid=`head 1 ${pidfile}` + echo "Stopping ${name}." + ${command} STOP + fi + ;; +restart) + if [ -x ${command} ]; then + echo "Restarting ${name}." + ${command} RESTARTME + fi + ;; +status) + if [ -f ${pidfile} ]; then + pid=`head -1 ${pidfile}` + echo "${name} is running as pid ${pid}." + else + echo "${name} is not running." + fi + ;; +esac) +exit 0 diff --git a/sysutils/apcupsd/files/md5 b/sysutils/apcupsd/files/md5 index 7d5c385ebb7..5813086f66b 100644 --- a/sysutils/apcupsd/files/md5 +++ b/sysutils/apcupsd/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $ +$NetBSD: md5,v 1.2 2000/08/05 07:31:16 jlam Exp $ -MD5 (apcupsd-3.5.8.src.tar.gz) = ced9e22844bd9b490bb5ec7dbed8b014 +MD5 (apcupsd-3.6.2.tar.gz) = 2512748a0cd7937b99adb7d92d917d4f diff --git a/sysutils/apcupsd/files/patch-sum b/sysutils/apcupsd/files/patch-sum index db99e9d6869..04684845d64 100644 --- a/sysutils/apcupsd/files/patch-sum +++ b/sysutils/apcupsd/files/patch-sum @@ -1,12 +1,11 @@ -$NetBSD: patch-sum,v 1.1 2000/01/21 19:17:03 bouyer Exp $ +$NetBSD: patch-sum,v 1.2 2000/08/05 07:31:17 jlam Exp $ -MD5 (patch-aa) = c12def25bc90455d711b3d416c08542e -MD5 (patch-ab) = 76d6f1c96bb2d9b841e75696c8142ad2 -MD5 (patch-ac) = cf0538899b14d3fbab4c54688b846b32 -MD5 (patch-ad) = 8f949994fa6d5220f0c79d18f7d0bf12 -MD5 (patch-ae) = 98cd671114488be7145cb31f1074e199 -MD5 (patch-af) = b646705b36b051c235c7ff324539e0ea -MD5 (patch-ag) = 96c819068224c6ac1fa843005541a386 -MD5 (patch-ah) = 383d130645c24cd1195a19973a8f529e -MD5 (patch-ai) = 84c21435bae5e38b6ac0ae15d930dd16 -MD5 (patch-aj) = a52aa37a6352eb75188dd36ef317384e +MD5 (patch-aa) = af67f75b5487cf80626c2247410eca21 +MD5 (patch-ab) = 568e39b7d4496ade71b2ba670e310567 +MD5 (patch-ac) = 511bfd8694ec429b0abf14406b44f98d +MD5 (patch-ad) = 0b127ea165d605de88dfbe150e2bab4f +MD5 (patch-ae) = c05e372a33c9fdb625f97e2b4f595886 +MD5 (patch-af) = dc377b31fd2fdea29cf95e23b6dfa321 +MD5 (patch-ag) = cb4f92d6d04c3a09b37c36326e1ce909 +MD5 (patch-ah) = 367a6b6feb8fbb9d061fb5c6e6c8c7c6 +MD5 (patch-ai) = 4be70365a678a2e7b319eb4283045969 diff --git a/sysutils/apcupsd/patches/patch-aa b/sysutils/apcupsd/patches/patch-aa index 4a09c56e089..49be3e0d3af 100644 --- a/sysutils/apcupsd/patches/patch-aa +++ b/sysutils/apcupsd/patches/patch-aa @@ -1,52 +1,102 @@ -$NetBSD: patch-aa,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $ +$NetBSD: patch-aa,v 1.2 2000/08/05 07:31:17 jlam Exp $ ---- Makefile.orig Wed Apr 7 18:06:41 1999 -+++ Makefile Tue Jul 20 18:36:50 1999 -@@ -85,7 +85,7 @@ - - SHELL = /bin/sh - ECHO = echo --MAKE = make -+MAKE ?= make - CHOWN = chown - CHMOD = chmod - CP = cp -@@ -120,6 +120,7 @@ - #* * - #**************************************************************************** - -+all: netbsd - default : - @$(ECHO) - @$(ECHO) "Usage: make " -@@ -201,7 +202,7 @@ - @$(ECHO) >> .ver - @$(ECHO) \#ifndef __$(OS)__ >> .ver - @$(ECHO) \#define __$(OS)__ >> .ver -- @$(ECHO) \#endif /*\ __$(OS)__ *\/ >> .ver -+ @$(ECHO) \#endif /*\ __$(OS)__\ \*\/ >> .ver - @$(ECHO) >> .ver - @if [ -d /usr/include/ncurses ]; then \ - if [ -f /usr/include/ncurses/curses.h ]; then \ -@@ -227,7 +228,7 @@ - $(ECHO) \#undef __CURSES__ >> .ver; \ - fi - @$(ECHO) >> .ver -- @$(ECHO) \#endif /*\_APC_VERSION_H *\/ >> .ver -+ @$(ECHO) \#endif /*\_APC_VERSION_H\ \*\/ >> .ver - @$(MV) -f .ver $@ - - ifdef MUSIC -@@ -301,6 +302,12 @@ - @$(MAKE) depend $(APCUPSD) \ - OS="freebsd" \ - CC="cc" -+ -+netbsd : -+ @$(MAKE) depend $(APCUPSD) \ -+ OS="netbsd" \ -+ CC="cc" -+ - - # Generic: Generic BSD-ish system running gcc - +--- doc/apcupsd.man.orig Thu Jul 29 03:46:32 1999 ++++ doc/apcupsd.man Sat Aug 5 02:52:40 2000 +@@ -8,13 +8,13 @@ + .SH NAME + apcupsd \- daemon for Most APCC's UPS support under Linux + .SH SYNOPSIS +-.B /sbin/apcupsd ++.B @@PREFIX@@/sbin/apcupsd + .br +-.B /sbin/powersc ++.B @@PREFIX@@/sbin/powersc + .br + .B /etc/apcupsd.conf + .br +-.B /sbin/apcaccess ++.B @@PREFIX@@/bin/apcaccess + .SH DESCRIPTION + .LP + This daemon can be used for controlling the APC SmartUPS. During a power +@@ -23,7 +23,7 @@ + about this fact. If power is not restored, a system shutdown will follow + when the battery is exausted, a timeout (seconds) expires, or runtime + minutes based on internal values based on power consumption rates. The +-whole shutdown is now made by script calls to the "/sbin/powersc" ++whole shutdown is now made by script calls to the "@@PREFIX@@/sbin/powersc" + file called by "apcupsd", so no changes in the inittab are necessary. + There is now no communication between "apcupsd" and init(1) process. + .LP +@@ -46,7 +46,7 @@ + .SH CONFIGURATION + It is necessary to write configuration info to the file "/etc/apcupsd.conf". + This file is a plain ASCII file and you can use your favorite editor for +-configuration. For simple configuration, see enclosed sample file. ++configuration. For simple configuration, see sample file in @@PREFIX@@/etc + .LP + Configuration commands in + .B /etc/apcupsd.conf +@@ -54,7 +54,7 @@ + .LP + .B CONTROL + -- +-.B /sbin/powersc ++.B @@PREFIX@@/sbin/powersc + .br + Name of control script called by "apcupsd". + .LP +@@ -121,7 +121,7 @@ + -- + .br + Please specify which device is used for UPS communication. +-The default is /dev/ttyS[0|1|2|3]. ++The default is /dev/tty0[0|1|2|3]. + .LP + .B LOCKFILE + -- +@@ -163,7 +163,7 @@ + --