pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/apcupsd Update to 3.14.1, based on patches se...
details: https://anonhg.NetBSD.org/pkgsrc/rev/dbff7b44f632
branches: trunk
changeset: 530083:dbff7b44f632
user: bouyer <bouyer%pkgsrc.org@localhost>
date: Fri Jun 15 19:05:56 2007 +0000
description:
Update to 3.14.1, based on patches sent in PR pkg/35594 and pkg/36246.
As a side effect this should make apcupsd build on netbsd-4 and current.
pkgsrc changes: cgi and snmp are now enabled by default.
Relevant changes since 3.12.4:
Unreliable MASTER/SLAVE networking mode is removed
PowerChute Network Shutdown driver (protocol available in the AP9617 family
of smart slot modules)
New configuration directives to set paths at runtime
diffstat:
sysutils/apcupsd/Makefile | 49 +-
sysutils/apcupsd/PLIST | 12 +-
sysutils/apcupsd/distinfo | 16 +-
sysutils/apcupsd/patches/patch-ab | 317 +-
sysutils/apcupsd/patches/patch-ae | 103 +-
sysutils/apcupsd/patches/patch-aj | 18983 +-----------------------------------
sysutils/apcupsd/patches/patch-an | 16 -
sysutils/apcupsd/patches/patch-ao | 18 -
8 files changed, 443 insertions(+), 19071 deletions(-)
diffs (truncated from 19708 to 300 lines):
diff -r 8b9e1c130514 -r dbff7b44f632 sysutils/apcupsd/Makefile
--- a/sysutils/apcupsd/Makefile Fri Jun 15 19:03:16 2007 +0000
+++ b/sysutils/apcupsd/Makefile Fri Jun 15 19:05:56 2007 +0000
@@ -1,35 +1,49 @@
-# $NetBSD: Makefile,v 1.49 2007/03/24 19:21:32 joerg Exp $
+# $NetBSD: Makefile,v 1.50 2007/06/15 19:05:56 bouyer Exp $
-DISTNAME= apcupsd-3.12.4
+DISTNAME= apcupsd-3.14.1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=apcupsd/}
-PKGREVISION= 1
MAINTAINER= bouyer%NetBSD.org@localhost
HOMEPAGE= http://www.apcupsd.org/
COMMENT= UPS power management for APCC Products
-USE_TOOLS+= gmake msgfmt sh makedepend
+USE_TOOLS+= msgfmt sh makedepend
USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
-PKG_SYSCONFSUBDIR= apcupsd
+PKG_SYSCONFSUBDIR= apcupsd
-# Thread support is needed to for http support, and to compile powerflute,
-# which has a curses interface
+# Thread support is needed to compile powerflute, which has a curses
+# interface (apparently needing ncurses), but pthreads isn't very
+# efficient and is less preferred.
#
-#CONFIGURE_ARGS+= --enable-http # include http support
#.include "../../devel/ncurses/buildlink3.mk"
#CONFIGURE_ARGS+= --enable-threads # compile threading code
#CONFIGURE_ARGS+= --enable-powerflute # compile powerflute program
+# XXX this should be an option...
+CONFIGURE_ARGS+= --enable-cgi # include CGI support
+CONFIGURE_ARGS+= --with-cgi-bin=${PREFIX}/libexec/cgi-bin
+#CONFIGURE_ARGS+= --with-net-port=${APCUPSD_NET_PORT} # un-registered port is 7000
+
+#CONFIGURE_ARGS+= --with-nis-port=${APCUPSD_NIS_PORT} # registered port is 3551
+#CONFIGURE_ARGS+= --with-upscable=${APCUPSD_UPS_CABLE}
+#CONFIGURE_ARGS+= --with-upscable=${APCUPSD_UPS_TYPE}
+
CONFIGURE_ARGS+= --enable-net # enable NIS network driver
CONFIGURE_ARGS+= --enable-usb # enable USB network driver
-#CONFIGURE_ARGS+= --enable-snmp # enable SNMP driver
+# XXX this should be an option...
+.include "../../net/net-snmp/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-snmp # enable SNMP driver
CONFIGURE_ARGS+= --with-catgets # use catgets functions
CONFIGURE_ARGS+= --enable-nls # i18n support
CONFIGURE_ARGS+= --with-lock-dir=${VARBASE}/spool/lock
+# XXX is this supposed to be the full filename?
+CONFIGURE_ARGS+= --with-log-dir=${VARBASE}/db/apcupsd.events
+# NOTE: You want the /dev/ttyXX for smart cables such as 940-0024C,
+# but probably the /dev/dtyXX for a basic smart-custom cable
CONFIGURE_ARGS+= --with-serial-dev=/dev/tty01
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
# configure sets sbindir to '${prefix}/sbin' without expanding $prefix
@@ -37,6 +51,7 @@
CONFIGURE_ARGS+= --sbindir=${PREFIX}/sbin
CONFIGURE_ENV+= SCRIPTSHELL=${TOOLS_SH:Q}
+CONFIGURE_ENV+= ac_cv_path_MAKE=${MAKE:Q}
EGDIR= ${PREFIX}/share/examples/apcupsd
@@ -44,8 +59,8 @@
CONF_FILES_PERMS+= ${EGDIR}/changeme ${PKG_SYSCONFDIR}/changeme ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/commfailure ${PKG_SYSCONFDIR}/commfailure ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/commok ${PKG_SYSCONFDIR}/commok ${ROOT_USER} ${ROOT_GROUP} 755
-CONF_FILES_PERMS+= ${EGDIR}/masterconnect ${PKG_SYSCONFDIR}/masterconnect ${ROOT_USER} ${ROOT_GROUP} 755
-CONF_FILES_PERMS+= ${EGDIR}/mastertimeout ${PKG_SYSCONFDIR}/mastertimeout ${ROOT_USER} ${ROOT_GROUP} 755
+CONF_FILES_PERMS+= ${EGDIR}/multimon.conf ${PKG_SYSCONFDIR}/multimon.conf ${ROOT_USER} ${ROOT_GROUP} 755
+CONF_FILES_PERMS+= ${EGDIR}/hosts.conf ${PKG_SYSCONFDIR}/hosts.conf ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/offbattery ${PKG_SYSCONFDIR}/offbattery ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/onbattery ${PKG_SYSCONFDIR}/onbattery ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/apccontrol ${PKG_SYSCONFDIR}/apccontrol ${ROOT_USER} ${ROOT_GROUP} 755
@@ -53,12 +68,20 @@
RCD_SCRIPT_SRC.apcupsd= ${WRKSRC}/distributions/netbsd/apcupsd
EGFILES= netbsd/apccontrol etc/changeme etc/commfailure etc/commok \
- etc/masterconnect etc/mastertimeout etc/offbattery etc/onbattery
+ etc/offbattery etc/onbattery etc/multimon.conf etc/hosts.conf
MANFILES= apcupsd apctest
INSTALLATION_DIRS= share/examples/apcupsd share/examples/rc.d
-# we should probably allow the tty to be set in /etc/mk.conf too
+SUBST_CLASSES+= strip
+SUBST_STAGE.strip= pre-configure
+SUBST_FILES.strip= autoconf/install-sh autoconf/targets.mak
+SUBST_FILES.strip+= src/gapcmon/Makefile.in src/cgi/Makefile.in
+SUBST_FILES.strip+= src/Makefile.in
+SUBST_SED.strip= -e "s|STRIP|STRIPFLAG|g"
+SUBST_MESSAGE.strip= Fixing conflicting STRIP variable name
+
+# XXX we should probably allow the tty to be set in /etc/mk.conf too
#
post-build:
${SED} -e 's|@@PREFIX@@|${PREFIX}|' \
diff -r 8b9e1c130514 -r dbff7b44f632 sysutils/apcupsd/PLIST
--- a/sysutils/apcupsd/PLIST Fri Jun 15 19:03:16 2007 +0000
+++ b/sysutils/apcupsd/PLIST Fri Jun 15 19:05:56 2007 +0000
@@ -1,4 +1,8 @@
-@comment $NetBSD: PLIST,v 1.6 2007/02/22 19:01:25 wiz Exp $
+@comment $NetBSD: PLIST,v 1.7 2007/06/15 19:05:56 bouyer Exp $
+libexec/cgi-bin/upsstats.cgi
+libexec/cgi-bin/upsfstats.cgi
+libexec/cgi-bin/upsimage.cgi
+libexec/cgi-bin/multimon.cgi
sbin/apcaccess
sbin/apctest
sbin/apcupsd
@@ -22,14 +26,14 @@
share/doc/html/apcupsd/systems.html
share/doc/html/apcupsd/systems.wml
share/doc/html/apcupsd/template.inc
+share/examples/apcupsd/apccontrol
share/examples/apcupsd/apcupsd.master.conf
share/examples/apcupsd/apcupsd.slave.conf
-share/examples/apcupsd/apccontrol
share/examples/apcupsd/changeme
share/examples/apcupsd/commfailure
share/examples/apcupsd/commok
-share/examples/apcupsd/masterconnect
-share/examples/apcupsd/mastertimeout
+share/examples/apcupsd/hosts.conf
+share/examples/apcupsd/multimon.conf
share/examples/apcupsd/offbattery
share/examples/apcupsd/onbattery
share/examples/rc.d/apcupsd
diff -r 8b9e1c130514 -r dbff7b44f632 sysutils/apcupsd/distinfo
--- a/sysutils/apcupsd/distinfo Fri Jun 15 19:03:16 2007 +0000
+++ b/sysutils/apcupsd/distinfo Fri Jun 15 19:05:56 2007 +0000
@@ -1,18 +1,16 @@
-$NetBSD: distinfo,v 1.9 2007/03/07 20:47:05 joerg Exp $
+$NetBSD: distinfo,v 1.10 2007/06/15 19:05:56 bouyer Exp $
-SHA1 (apcupsd-3.12.4.tar.gz) = a36212d9634d36beda2318d85b882209763f2473
-RMD160 (apcupsd-3.12.4.tar.gz) = a54c2f6d71c902d7963a1c65a3850f657aabaa88
-Size (apcupsd-3.12.4.tar.gz) = 4223158 bytes
+SHA1 (apcupsd-3.14.1.tar.gz) = ee2a9ba074b688aba047d571098f44dc591e985c
+RMD160 (apcupsd-3.14.1.tar.gz) = f6655123f7daa91966e9a2a4877e90b70babc670
+Size (apcupsd-3.14.1.tar.gz) = 4352400 bytes
SHA1 (patch-aa) = 112c8db7a67456821a2e449d6a8ff600a7998dc0
-SHA1 (patch-ab) = 38ca41df0d96130f5c2202cb85d61f3202ec17ad
+SHA1 (patch-ab) = b0976e7b98be56ff4e38b615db693729c834811f
SHA1 (patch-ac) = 98e8853dd030e09d5a487e57a277ff1269baa517
SHA1 (patch-ad) = 48818f95966f5c9f742e333614b0ab5387886e62
-SHA1 (patch-ae) = 27ec597c42e2484e4441eea3f5891eb94659d1ab
+SHA1 (patch-ae) = 5e2ded84436b1da8b0eec6577065e0630ce00e78
SHA1 (patch-af) = c4a52226d83ac50adcd9296afd786b42867a7a6d
SHA1 (patch-ag) = 2b77e969d6cbe8ed06797cd753eb443bd6a3881b
-SHA1 (patch-aj) = 1786e22d520520b066c0155315c48def2827eb90
+SHA1 (patch-aj) = cce8e25f52cc4eaa38eb31baffceb33fe4a43cee
SHA1 (patch-ak) = c3069d2b8d9059b383874989cde2edaecd35d49b
SHA1 (patch-al) = a41cb4ee8d896fc633d8869f24e548fda0761340
SHA1 (patch-am) = a2c060519748cf95f0f9aaa284f783f086c1d7d4
-SHA1 (patch-an) = 518ed5d1b7c5e20e8f5b5aa0025a8c5f1c908dc0
-SHA1 (patch-ao) = 62576f181dd8e5352221f2079ee4c2e34d64c20a
diff -r 8b9e1c130514 -r dbff7b44f632 sysutils/apcupsd/patches/patch-ab
--- a/sysutils/apcupsd/patches/patch-ab Fri Jun 15 19:03:16 2007 +0000
+++ b/sysutils/apcupsd/patches/patch-ab Fri Jun 15 19:05:56 2007 +0000
@@ -1,12 +1,80 @@
-$NetBSD: patch-ab,v 1.4 2006/11/15 21:46:25 bouyer Exp $
+$NetBSD: patch-ab,v 1.5 2007/06/15 19:05:56 bouyer Exp $
--- examples/apcupsd.master.conf.orig 2002-05-28 15:34:19.000000000 +0200
-+++ examples/apcupsd.master.conf 2006-11-15 17:25:41.000000000 +0100
-@@ -33,11 +33,11 @@
++++ examples/apcupsd.master.conf 2007-06-15 17:12:48.000000000 +0200
+@@ -1,78 +1,120 @@
+ ## apcupsd.conf v1.1 ##
+-#
+-# for apcupsd release 3.8.0
+-#
+-# "apcupsd" POSIX config file
+-#
+-# If you have used a prior version of apcupsd, the CONTROL script file
+-# (/sbin/powersc) has now been replaced by /etc/apcupsd/apccontrol.
+-# Consequently, the CONTROL configuration statement is obsolete.
+-# The following configuration statements have been replaced by scripts
+-# called from /etc/apcupsd/apccontrol, and thus are obsolete:
+-# BATTCMD, LIMITCMN, LOADCMD, PWRCMD, REBOOTCMD, REMOTECMD, RETCMD,
+-# and TIMECMD.
+ #
++# for apcupsd release 3.10.6 (10 October 2003) - freebsd
+ #
++# "apcupsd" POSIX config file
+ #
+ # ========= General configuration parameters ============
+ #
++# UPSNAME xxx
++# Use this to give your UPS a name in log files and such. This
++# is particulary useful if you have multiple UPSes. This does not
++# set the EEPROM.
++#UPSNAME
++#
+ # UPSCABLE [ simple | smart |
+-# 940-00(20B,23A,24B,24C,24G,95A,95B,95C) |
++# 940-00(20B,20C,23A,24B,24C,24G,95A,95B,95C) |
+ # 940-15(24C) |
+-# ether ]
++# ether, usb ]
+ # defines the type of cable that you have.
+ UPSCABLE smart
+ #
++# Old types, still valid, are mapped to the new generic drives
++# automatically
+ # UPSTYPE [ backups | sharebasic | netups |
+ # backupspro | smartvsups |
+ # newbackupspro | backupspropnp |
+ # smartups | matrixups | sharesmart ]
++#
++# *** NEW TYPES FOR GENERIC DRIVERS ***
++# UPSTYPE [ dumb | apcsmart | net | usb | snmp | test]
+ # defines the type of UPS you have.
+ UPSTYPE smartups
+ #
#
#DEVICE <string> /dev/<serial port>
- # name of your serial port
+-# name of your serial port
-DEVICE /dev/ttyS0
++# name of your UPS device
++#
++# Here a table of the possible devices related with the UPS drivers.
++#
++# NOTE!!! for USB devices, please use a form indicated below
++# including the [0-15] as written!
++#
++# Driver Device Description
++# dumb /dev/tty** Serial character device
++# apcsmart /dev/tty** Serial character device
++# usb /dev/usb/hid/hiddev[0-15] If you follow our naming scheme
++# usb /dev/usb/hiddev[0-15] On some systems
++# net hostname:port Network link to a master apcupsd
++# through NIS
++# snmp hostname:port:vendor:community
++# SNMP Network link to an SNMP-enabled
++# UPS device. Vendor is the MIB used by
++# the UPS device: can be "APC" or "RFC"
++# where APC is the powernet MIB and RFC
++# is the IETF's rfc1628 UPS-MIB.
++# Port is usually 161.
+DEVICE /dev/tty01
#
#LOCKFILE <path to lockfile>
@@ -16,49 +84,256 @@
#
#
#
-@@ -80,7 +80,7 @@
+ # ======== configuration parameters used during power failures ==========
+ #
+-# BATTERYLEVEL <percent of battery charge for shutdown> 10
++# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
++# the first that occurs will cause the initation of a shutdown.
++#
++# If during a power failure, the remaining battery percentage
++# (as reported by the UPS) is below or equal to BATTERYLEVEL,
++# apcupsd will initiate a system shutdown.
+ BATTERYLEVEL 5
+ #
+-# MINUTES <time in minutes of remaining battery runtime before shutdown> 5
++#
++# If during a power failure, the remaining runtime in minutes
++# (as calculated internally by the UPS) is below or equal to MINUTES,
++# apcupsd, will initiate a system shutdown.
+ MINUTES 3
+ #
+-# TIMEOUT <time is seconds to run on UPS after a power failure>
++#
++# If during a power failure, the UPS has run on batteries for TIMEOUT
++# many seconds or longer, apcupsd will initiate a system shutdown.
++# A value of 0 disables this timer.
++#
+ # Note, if you have a Smart UPS, you will most likely want to disable
+ # this timer by setting it to zero. That way, you UPS will continue
+-# on batteries until either the % charge remaing drops below BATTERYLEVEL,
+-# or the remaining battery runtime drops below MINUTES. Of course,
++# on batteries until either the % charge remaing drops to or below BATTERYLEVEL,
++# or the remaining battery runtime drops to or below MINUTES. Of course,
+ # if you are testing, setting this to 60 causes a quick system shutdown
+-# if you pull the power plug.
++# if you pull the power plug.
+ # If you have an older dumb UPS, you will want to set this to less than
+ # the time you know you can run on batteries.
+ TIMEOUT 0
+-
+ #
+-# ANNOY <int> <30> <0> disables
++#
+ # Time in seconds between annoying users to signoff prior to
+-# system shutdown.
++# system shutdown. 0 disables.
Home |
Main Index |
Thread Index |
Old Index