aboutsummaryrefslogtreecommitdiff
path: root/system/apcupsd
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-11 19:46:20 +0200
committerAlan Hicks <alan@lizella.net>2010-05-11 19:46:20 +0200
commit6eea7026fb6bb92eb0f59979dbb4de618fa451bb (patch)
tree8d5a2806196f7c6387d62183d48a90c739bdd3d0 /system/apcupsd
parent26c4dd962086c59d6571068ce10179cf190991ce (diff)
system/apcupsd: Updated for version 3.14.3
Diffstat (limited to 'system/apcupsd')
-rw-r--r--system/apcupsd/README3
-rw-r--r--system/apcupsd/README-SLACKWARE7
-rw-r--r--system/apcupsd/apcupsd.SlackBuild27
-rw-r--r--system/apcupsd/apcupsd.info8
-rw-r--r--system/apcupsd/doinst.sh11
-rw-r--r--system/apcupsd/slack-desc12
6 files changed, 36 insertions, 32 deletions
diff --git a/system/apcupsd/README b/system/apcupsd/README
index 6646eb7aecc00..028579ed5eb95 100644
--- a/system/apcupsd/README
+++ b/system/apcupsd/README
@@ -13,7 +13,6 @@ the distribution-specific installation to prevent messing with files outside
DESTDIR; however, this does make it require some manual configuration after
installation.
-After installing, see /usr/doc/apcupsd-3.14.0/README-SLACKWARE for more
+After installing, see /usr/doc/apcupsd-3.14.3/README-SLACKWARE for more
information on how to modify rc.6 and how to start the apcupsd daemon
automatically at boot.
-
diff --git a/system/apcupsd/README-SLACKWARE b/system/apcupsd/README-SLACKWARE
index b4d6a1a93aba8..f61c7ca3c9100 100644
--- a/system/apcupsd/README-SLACKWARE
+++ b/system/apcupsd/README-SLACKWARE
@@ -1,12 +1,7 @@
README-SLACKWARE
Written by Robby Workman <rworkman@slackbuilds.org>
-
-First, see /usr/doc/apcupsd-3.14.0/examples/make-hiddev if you're using
-a 2.4.x kernel and need to manually create the device node(s).
-
-
-Second, you'll need to start the apcupsd service at boot.
+You'll need to start the apcupsd service at boot.
The recommended way is to add the following to your /etc/rc.d/rc.local
script:
diff --git a/system/apcupsd/apcupsd.SlackBuild b/system/apcupsd/apcupsd.SlackBuild
index 6f110ed61299a..b0c7ff7b02924 100644
--- a/system/apcupsd/apcupsd.SlackBuild
+++ b/system/apcupsd/apcupsd.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for apcupsd
-# Copyright 2006-2007 Robby Workman (http://rlworkman.net)
+# Copyright 2006-2008 Robby Workman (http://rlworkman.net)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,23 +22,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified by the SlackBuilds.org project
-
-set -e
-
PRGNAM=apcupsd
-VERSION=3.14.0
+VERSION=3.14.3
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-SNMP=${SNMP:-no} # Change to "yes" if you have net-snmp installed
- # and wish to have support for SNMP
-
# These can be changed in the config file after installing apcupsd,
# so it's okay to leave them alone if you don't know what the values
# should be yet.
@@ -52,11 +46,13 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
@@ -82,12 +78,10 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-powerflute \
--with-libwrap \
--enable-nls \
- --enable-snmp=$SNMP \
+ --enable-snmp=yes \
--with-upstype=$UPSTYPE \
--with-upscable=$UPSCABLE \
- --with-dev=$DEVICE \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --with-dev=$DEVICE
make
make install-strip DESTDIR=$PKG
@@ -110,6 +104,7 @@ install -D -m 0755 platforms/slackware/apcupsd \
# Create the /var/lock/subsys directory
install -d -m 0755 $PKG/var/lock/subsys
+chmod 1777 $PKG/var/lock
# Rename config files to *.new so custom changes aren't clobberred
for i in apccontrol apcupsd.conf apcupsd.css changeme \
@@ -124,7 +119,7 @@ done
)
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed s/VERSION/$VERSION/ $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
diff --git a/system/apcupsd/apcupsd.info b/system/apcupsd/apcupsd.info
index a4fbba559fcd9..a0819fe98f065 100644
--- a/system/apcupsd/apcupsd.info
+++ b/system/apcupsd/apcupsd.info
@@ -1,8 +1,8 @@
PRGNAM="apcupsd"
-VERSION="3.14.0"
+VERSION="3.14.3"
HOMEPAGE="http://www.apcupsd.org"
-DOWNLOAD="http://dl.sourceforge.net/apcupsd/apcupsd-3.14.0.tar.gz"
-MD5SUM="334fe3413c08f14acec0226e71e98e0a"
+DOWNLOAD="http://downloads.sourceforge.net/apcupsd/apcupsd-3.14.3.tar.gz"
+MD5SUM="a212351d21828e9344264614c7ad8ba1"
MAINTAINER="Robby Workman"
EMAIL="rw@rlworkman.net"
-APPROVED="BP{k}"
+APPROVED="Alan_Hicks,Erik Hanson"
diff --git a/system/apcupsd/doinst.sh b/system/apcupsd/doinst.sh
index f393efaa2205a..066579eb4b0ee 100644
--- a/system/apcupsd/doinst.sh
+++ b/system/apcupsd/doinst.sh
@@ -1,10 +1,10 @@
config() {
NEW="$1"
- OLD="`dirname $NEW`/`basename $NEW .new`"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
- elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
@@ -30,5 +30,12 @@ do \
config etc/apcupsd/$i;
done
+# Keep same perms on rc.apcupsd.new:
+if [ -e etc/rc.d/rc.apcupsd ]; then
+ cp -a etc/rc.d/rc.apcupsd etc/rc.d/rc.apcupsd.new.incoming
+ cat etc/rc.d/rc.apcupsd.new > etc/rc.d/rc.apcupsd.new.incoming
+ mv etc/rc.d/rc.apcupsd.new.incoming etc/rc.d/rc.apcupsd.new
+fi
+
config etc/rc.d/rc.apcupsd.new
diff --git a/system/apcupsd/slack-desc b/system/apcupsd/slack-desc
index 7971e763102a0..847312d3cfdd5 100644
--- a/system/apcupsd/slack-desc
+++ b/system/apcupsd/slack-desc
@@ -1,11 +1,19 @@
-apcupsd: APC UPS Daemon
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+apcupsd: apcupsd (APC UPS Daemon)
apcupsd:
apcupsd: Apcupsd can be used for power mangement and controlling most of APC's
apcupsd: UPS models on Unix and Windows machines. Apcupsd works with most of
apcupsd: APC's Smart-UPS models as well as most simple signalling models such
apcupsd: as Back-UPS, and BackUPS-Office.
apcupsd:
-apcupsd: See /usr/doc/apcupsd-$VERSION/README-SLACKWARE
+apcupsd: See /usr/doc/apcupsd-VERSION/README-SLACKWARE
apcupsd:
apcupsd:
apcupsd: