summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbouyer <bouyer>2000-01-21 19:15:59 +0000
committerbouyer <bouyer>2000-01-21 19:15:59 +0000
commitd1908dc3f589e31fbc1b17752602bcd8fe79413b (patch)
treea0df28a970fa32635bf64137c72568c74f1902c8
parentb2d0f11b16a67a71eec0becef8e69339b0f78ed5 (diff)
downloadpkgsrc-d1908dc3f589e31fbc1b17752602bcd8fe79413b.tar.gz
apcupsd, a daemon to manage and monitor APC UPSes.
-rw-r--r--sysutils/apcupsd/Makefile29
-rw-r--r--sysutils/apcupsd/files/md53
-rw-r--r--sysutils/apcupsd/patches/patch-aa52
-rw-r--r--sysutils/apcupsd/patches/patch-ab14
-rw-r--r--sysutils/apcupsd/patches/patch-ac20
-rw-r--r--sysutils/apcupsd/patches/patch-ad14
-rw-r--r--sysutils/apcupsd/patches/patch-ae73
-rw-r--r--sysutils/apcupsd/patches/patch-af28
-rw-r--r--sysutils/apcupsd/patches/patch-ag17
-rw-r--r--sysutils/apcupsd/patches/patch-ah75
-rw-r--r--sysutils/apcupsd/patches/patch-ai112
-rw-r--r--sysutils/apcupsd/patches/patch-aj26
-rw-r--r--sysutils/apcupsd/pkg/COMMENT1
-rw-r--r--sysutils/apcupsd/pkg/DESCR5
-rw-r--r--sysutils/apcupsd/pkg/PLIST16
15 files changed, 485 insertions, 0 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile
new file mode 100644
index 00000000000..674273254a0
--- /dev/null
+++ b/sysutils/apcupsd/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/01/21 19:15:59 bouyer 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/
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/apcupsd/files/md5 b/sysutils/apcupsd/files/md5
new file mode 100644
index 00000000000..7d5c385ebb7
--- /dev/null
+++ b/sysutils/apcupsd/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $
+
+MD5 (apcupsd-3.5.8.src.tar.gz) = ced9e22844bd9b490bb5ec7dbed8b014
diff --git a/sysutils/apcupsd/patches/patch-aa b/sysutils/apcupsd/patches/patch-aa
new file mode 100644
index 00000000000..4a09c56e089
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-aa
@@ -0,0 +1,52 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/01/21 19:15:59 bouyer 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 <system-type>"
+@@ -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
+
diff --git a/sysutils/apcupsd/patches/patch-ab b/sysutils/apcupsd/patches/patch-ab
new file mode 100644
index 00000000000..915b2e682e2
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-ab
@@ -0,0 +1,14 @@
+$NetBSD: patch-ab,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $
+
+--- apcaction.c Wed Apr 7 18:06:41 1999
++++ apcaction.c Sun Jul 18 19:48:13 1999
+@@ -59,7 +59,9 @@
+
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __NetBSD__
+ #include <getopt.h>
++#endif /* __NetBSD__ */
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <fcntl.h>
diff --git a/sysutils/apcupsd/patches/patch-ac b/sysutils/apcupsd/patches/patch-ac
new file mode 100644
index 00000000000..06d2539ee3f
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-ac
@@ -0,0 +1,20 @@
+$NetBSD: patch-ac,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $
+
+--- apchttp.c Wed Apr 7 18:06:41 1999
++++ apchttp.c Sun Jul 18 19:50:58 1999
+@@ -70,7 +70,6 @@
+
+ #include <ctype.h>
+ #include <errno.h>
+-#include <netinet/in.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -80,6 +79,7 @@
+ #include <sys/types.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <netinet/in.h>
+
+ /* apc includes */
+ #include <apc_version.h>
diff --git a/sysutils/apcupsd/patches/patch-ad b/sysutils/apcupsd/patches/patch-ad
new file mode 100644
index 00000000000..1176564e804
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $
+
+--- apcreports.c Wed Apr 7 18:06:41 1999
++++ apcreports.c Sun Jul 18 19:48:17 1999
+@@ -58,7 +58,9 @@
+
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __NetBSD__
+ #include <getopt.h>
++#endif /* __NetBSD__ */
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <fcntl.h>
diff --git a/sysutils/apcupsd/patches/patch-ae b/sysutils/apcupsd/patches/patch-ae
new file mode 100644
index 00000000000..0249bb795b5
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-ae
@@ -0,0 +1,73 @@
+$NetBSD: patch-ae,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $
+
+--- apcserial.c.orig Wed Apr 7 18:06:41 1999
++++ apcserial.c Fri Jan 7 18:54:39 2000
+@@ -59,7 +59,9 @@
+
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __NetBSD__
+ #include <getopt.h>
++#endif /* __NetBSD__ */
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <fcntl.h>
+@@ -135,10 +137,10 @@
+ newtio.c_oflag = 0; /* Raw output */
+ newtio.c_lflag = 0; /* No local echo */
+
+-#ifdef __freebsd__
++#if defined(__freebsd__) || defined (__NetBSD__)
+ newtio.c_ispeed = DEFAULT_SPEED; /* Set input speed */
+ newtio.c_ospeed = DEFAULT_SPEED; /* Set output speed */
+-#endif /* __freebsd__ */
++#endif /* __freebsd__ || __NetBSD__ */
+
+ /* w.p. This makes a non.blocking read() with 5 sec. timeout */
+ newtio.c_cc[VMIN] = 0;
+@@ -195,7 +197,6 @@
+ {
+ char response[32]; /* w.p. */
+ char a;
+- FILE *pwdf;
+ int errflag = 0;
+ response[0] = '\0';
+
+@@ -230,19 +231,6 @@
+ }
+ }
+ }
+- if ((((pwdf = fopen(PWRFAIL, "r" )) == NULL) &&
+- (ups->mode.type != BK)) ||
+- (((pwdf = fopen(PWRFAIL, "r" )) == NULL) &&
+- (ups->LineUp != 0) && (ups->mode.type == BK))) {
+- fprintf(stderr,
+- "%s: Attempting to kill the power!\n" \
+- "%s: Nice TRY but not TODAY!\n" \
+- "%s: Shutdown not called first.\n" \
+- "%s: Bug found by Tom Kunicki\n",
+- ups->argvalue, ups->argvalue,
+- ups->argvalue, ups->argvalue);
+- terminate(0);
+- } else {
+ errflag=0; /* w.p. */
+ if ((ups->class.type == SHAREMASTER) ||
+ (ups->class.type == SHARENETMASTER)) {
+@@ -259,7 +247,6 @@
+ ups->argvalue);
+ sleep(15);
+ }
+- fclose(pwdf);
+
+ fprintf(stderr,
+ "%s: Attempting to kill the power!\n",
+@@ -407,9 +394,7 @@
+ }
+ }
+ /* w.p. */
+- sleep(10);
+ terminate(0);
+- }
+ } else {
+ if (ups->mode.type <= SHAREBASIC) {
+ switch(ups->cable.type) {
diff --git a/sysutils/apcupsd/patches/patch-af b/sysutils/apcupsd/patches/patch-af
new file mode 100644
index 00000000000..3705c241ef3
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-af
@@ -0,0 +1,28 @@
+$NetBSD: patch-af,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $
+
+--- apcupsd.c.orig Wed Apr 7 18:06:41 1999
++++ apcupsd.c Fri Jan 7 18:55:53 2000
+@@ -100,7 +100,9 @@
+
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __NetBSD__
+ #include <getopt.h>
++#endif /* __NetBSD__ */
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <fcntl.h>
+@@ -290,13 +292,6 @@
+ * it should close them.
+ *********************************************************************/
+ void terminate (int sig) {
+- /*
+- * XXX - Is someone able to explain me why here we find a sleep for 10
+- * seconds ?
+- *
+- * -RF
+- */
+- sleep(10);
+ #ifdef NEW_THREADS
+ restore_signals();
+ #endif /* NEW_THREADS */
diff --git a/sysutils/apcupsd/patches/patch-ag b/sysutils/apcupsd/patches/patch-ag
new file mode 100644
index 00000000000..9f43787d062
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-ag
@@ -0,0 +1,17 @@
+$NetBSD: patch-ag,v 1.1.1.1 2000/01/21 19:16:00 bouyer Exp $
+
+--- include/apc_defines.h Wed Apr 7 18:06:41 1999
++++ nclude/apc_defines.h Sun Jul 18 19:45:49 1999
+@@ -66,6 +66,12 @@
+ #define PWRFAIL "/var/run/powerfail"
+ #endif /* __freebsd__ */
+
++#ifdef __NetBSD__
++#define APCCONF "/etc/apcupsd.conf"
++#define UPS_STAT "/var/log/apcupsd.status"
++#define PWRFAIL "/var/run/powerfail"
++#endif /* __NetBSD__ */
++
+ #ifndef APCCONF
+ #define APCCONF "/etc/apcupsd.conf"
+ #endif
diff --git a/sysutils/apcupsd/patches/patch-ah b/sysutils/apcupsd/patches/patch-ah
new file mode 100644
index 00000000000..3bedac48936
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-ah
@@ -0,0 +1,75 @@
+$NetBSD: patch-ah,v 1.1.1.1 2000/01/21 19:16:00 bouyer Exp $
+
+--- docs/apcupsd.man8.orig Wed Apr 7 18:06:41 1999
++++ docs/apcupsd.man8 Tue Jul 20 19:27:28 1999
+@@ -8,13 +8,13 @@
+ .SH NAME
+ apcupsd \- daemon for Most APCC's UPS support under Linux and UNIX
+ .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
+ -- <path|filename>
+-.B /sbin/powersc
++.B @@PREFIX@@/sbin/powersc
+ .br
+ Name of control script called by "apcupsd".
+ .LP
+@@ -123,7 +123,7 @@
+ -- <name of serial port>
+ .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
+ -- <path to lockfile>
+@@ -165,7 +165,7 @@
+ -- <time in seconds>
+ .br
+ Please specify time in seconds for "apcupsd" to update the psuedo
+-proc fs file "/etc/apcupsd.status". This rate is reset if there is
++proc fs file "/var/log/apcupsd.status". This rate is reset if there is
+ a power state change.
+ .LP
+ This will be replaced with "apcaccess 'status'" calls. This will prevent
+@@ -478,7 +478,7 @@
+ .B /etc/apcupsd.conf
+ - configuration file.
+ .br
+-.B /etc/apcupsd.status
++.B /var/log/apcupsd.status
+ - psuedo procfs-type file.
+ .br
+ .B /var/log/apcupsd.log
diff --git a/sysutils/apcupsd/patches/patch-ai b/sysutils/apcupsd/patches/patch-ai
new file mode 100644
index 00000000000..30a38aa75c9
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-ai
@@ -0,0 +1,112 @@
+$NetBSD: patch-ai,v 1.1.1.1 2000/01/21 19:16:00 bouyer Exp $
+
+--- installs/powersc.orig Tue Jul 20 18:58:51 1999
++++ installs/powersc Tue Jul 20 19:14:13 1999
+@@ -4,25 +4,9 @@
+ POWERPID=/var/run/power.pid
+ APCPID=/var/run/apcupsd.pid
+
+-if [ -x /sbin/shutdown ]; then
+ SHUTDOWN=/sbin/shutdown
+-elif [ -x /sbin/shutdown.bsd ]; then
+- SHUTDOWN=/sbin/shutdown.bsd
+-else
+- echo Command shutdown or shutdown.bsd not found!
+- exit 1
+-fi
+
+-if [ -x /usr/local/sbin/apcupsd ]; then
+- APCUPSD=/usr/local/sbin/apcupsd
+-elif [ -x /usr/sbin/apcupsd ]; then
+- APCUPSD=/usr/sbin/apcupsd
+-elif [ -x /sbin/apcupsd ]; then
+- APCUPSD=/sbin/apcupsd
+-else
+- echo Command apcupsd not found!
+- exit 1
+-fi
++ APCUPSD=@@PREFIX@@/sbin/apcupsd
+
+ if test "$(whoami)" != "root"; then
+ printf "Sorry, you must be root to run this script." | wall
+@@ -32,42 +16,52 @@
+ case "$1" in
+ POWEROUT)
+ printf "Warning there are Power problems." | wall
++ /usr/bin/logger -p user.info -t apcupsd \
++ "Warning there are Power problems."
+ ;;
+ ONBATTERY)
+ printf "Power Failure running on UPS." | wall
++ /usr/bin/logger -p user.info -t apcupsd \
++ "Power Failure running on UPS."
+ ;;
+ FAILING)
+ printf "Battery Power Failed, Normal Shutdown.\n" | wall
++ /usr/bin/logger -p user.emerg -t apcupsd \
++ "UPS Battery Power Failed, Normal Shutdown."
+ ;;
+ TIMEOUT)
+ printf "Online Battery timeout, Normal Shutdown.\n" | wall
++ /usr/bin/logger -p user.emerg -t apcupsd \
++ "UPS Online Battery timeout, Normal Shutdown."
+ ;;
+ LOADLIMIT)
+ printf "Battery Load Limits Reached, Normal Shutdown.\n" | wall
++ /usr/bin/logger -p user.emerg -t apcupsd \
++ "UPS Battery Load Limits Reached, Normal Shutdown."
+ ;;
+ RUNLIMIT)
+ printf "Battery RunTime Limits Reached, Normal Shutdown.\n" | wall
++ /usr/bin/logger -p user.emerg -t apcupsd \
++ "Battery RunTime Limits Reached, Normal Shutdown."
+ ;;
+ DOSHUTDOWN)
+ printf "Beginning Shutdown Sequence!!!!!" | wall
+- ps x | gawk '{ if (($5 == "init") && ($1 == "1")) print $6 }' \
+- | cut -f2 -d[ | cut -f1 -d] \
+- > /tmp/run.level.power
+ if [ -f $POWERPID ]
+ then
+ exit 0
+ else
+ echo $$ > $POWERPID
+- $SHUTDOWN -h now
++ $SHUTDOWN -h now "UPS Powerfail"
+ fi
+ ;;
+ MAINSBACK | WAITASEC)
+ printf "Power has returned..." | wall
++ /usr/bin/logger -p user.info -t apcupsd \
++ "Power has returned..."
+ if [ -f $POWERPID ]; then
+ printf "Attempting to cancel shutdown."
+ kill $(cat $POWERPID)
+ rm -f $POWERPID
+- init $(cat /tmp/run.level.power)
+ fi
+ ;;
+ ANNOYME)
+@@ -75,14 +69,20 @@
+ ;;
+ EMERGENCY)
+ printf "Emergency Shutdown, Possible Battery Failure!!!!" | wall
+- $SHUTDOWN -h now
++ /usr/bin/logger -p user.emerg -t apcupsd \
++ "Emergency Shutdown, Possible Battery Failure!!!!"
++ $SHUTDOWN -h now "Emergency Shutdown"
+ ;;
+ CHANGEME)
+ printf "Emergency, Batteries Have Failed!!!!\nChange Them NOW!!!!" | wall
++ /usr/bin/logger -p user.emerg -t apcupsd \
++ "Emergency, Batteries Have Failed!!!! Change Them NOW!!!!"
+ ;;
+ REMOTE)
+ printf "Remote Calls, Normal Shutdown.\nBeginning Shutdown Sequence!!!!!" | wall
+- $SHUTDOWN -h now
++ /usr/bin/logger -p user.emerg -t apcupsd \
++ "Remote Calls, Normal Shutdown"
++ $SHUTDOWN -h now "Remote Calls, Normal Shutdown"
+ ;;
+ KILL) sleep 1
+ $APCUPSD killpower
diff --git a/sysutils/apcupsd/patches/patch-aj b/sysutils/apcupsd/patches/patch-aj
new file mode 100644
index 00000000000..b5fe5ff07fd
--- /dev/null
+++ b/sysutils/apcupsd/patches/patch-aj
@@ -0,0 +1,26 @@
+$NetBSD: patch-aj,v 1.1.1.1 2000/01/21 19:16:00 bouyer Exp $
+
+--- installs/apcupsd.conf.orig Tue Jul 20 19:32:16 1999
++++ installs/apcupsd.conf Tue Jul 20 19:32:54 1999
+@@ -3,7 +3,7 @@
+ # "apcupsd" POSIX config file
+ #
+ # CONTROL <string>
+-CONTROL /sbin/powersc
++CONTROL @@PREFIX@@/sbin/powersc
+ #
+ # UPSCABLE [ simple | smart | 940-00(20B,23A,24B,24C,24G,95A,95C) | ether ]
+ UPSCABLE 940-0024B
+@@ -22,10 +22,10 @@
+ UPSMODE disable
+ #
+ #DEVICE <string> /dev/<serial port>
+-DEVICE /dev/ttyS0
++DEVICE /dev/tty00
+ #
+ #LOCKFILE <path to lockfile>
+-LOCKFILE /var/lock
++LOCKFILE /var/run
+ #
+ #ACCESS <string> [ true | false ] Enable Access Support
+ ACCESS true
diff --git a/sysutils/apcupsd/pkg/COMMENT b/sysutils/apcupsd/pkg/COMMENT
new file mode 100644
index 00000000000..8de51d31132
--- /dev/null
+++ b/sysutils/apcupsd/pkg/COMMENT
@@ -0,0 +1 @@
+UPS power management under for APCC Products.
diff --git a/sysutils/apcupsd/pkg/DESCR b/sysutils/apcupsd/pkg/DESCR
new file mode 100644
index 00000000000..37a5018dbfe
--- /dev/null
+++ b/sysutils/apcupsd/pkg/DESCR
@@ -0,0 +1,5 @@
+It allows your computer/server to run during power problems
+for a specified length of time or the life of the batteries
+in your BackUPS, BackUPS Pro, SmartUPS v/s, or SmartUPS, and
+then properly executes a controlled shutdown during an
+extended power failure.
diff --git a/sysutils/apcupsd/pkg/PLIST b/sysutils/apcupsd/pkg/PLIST
new file mode 100644
index 00000000000..47050158d23
--- /dev/null
+++ b/sysutils/apcupsd/pkg/PLIST
@@ -0,0 +1,16 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2000/01/21 19:15:59 bouyer Exp $
+
+bin/apcaccess
+sbin/apcupsd
+sbin/powersc
+etc/apcupsd.conf.sample
+man/man8/apcupsd.8
+share/doc/apcupsd/README.BackUPS-Pro
+share/doc/apcupsd/README.NewerBackUPS-Pro
+share/doc/apcupsd/README.Share-UPS
+share/doc/apcupsd/README.SmartUPS-VS
+share/doc/apcupsd/README.apcaccess
+share/doc/apcupsd/README.autoconfig
+share/doc/apcupsd/README.cable
+share/doc/apcupsd/minicom.apcupsd
+@dirrm share/doc/apcupsd