aboutsummaryrefslogtreecommitdiff
path: root/system/apcupsd
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-12 17:44:57 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 17:44:57 +0200
commit440b72989b3a330594e689c3ef74ab3dbae85519 (patch)
tree634e761f7c8e360e84bfdf13d1fc121eb842192a /system/apcupsd
parent7e7696327cd7233cec689563f77e01223710b69c (diff)
system/apcupsd: Updated for version 3.14.5
Diffstat (limited to 'system/apcupsd')
-rw-r--r--system/apcupsd/README2
-rw-r--r--system/apcupsd/README.SLACKWARE (renamed from system/apcupsd/README-SLACKWARE)0
-rw-r--r--system/apcupsd/apcupsd.SlackBuild31
-rw-r--r--system/apcupsd/apcupsd.info8
-rw-r--r--system/apcupsd/apcupsd.logrotate8
-rw-r--r--system/apcupsd/doinst.sh3
-rw-r--r--system/apcupsd/slack-desc4
7 files changed, 37 insertions, 19 deletions
diff --git a/system/apcupsd/README b/system/apcupsd/README
index a5aafec1fc4f..f41fdcf6306b 100644
--- a/system/apcupsd/README
+++ b/system/apcupsd/README
@@ -13,6 +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.4/README-SLACKWARE for more
+After installing, see /usr/doc/apcupsd-3.14.5/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 9587d0e26be0..9587d0e26be0 100644
--- a/system/apcupsd/README-SLACKWARE
+++ b/system/apcupsd/README.SLACKWARE
diff --git a/system/apcupsd/apcupsd.SlackBuild b/system/apcupsd/apcupsd.SlackBuild
index af4edb58ae74..eff23168bbc6 100644
--- a/system/apcupsd/apcupsd.SlackBuild
+++ b/system/apcupsd/apcupsd.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for apcupsd
-# Copyright 2006-2008 Robby Workman Northport, Alabama, USA
+# Copyright 2006-2009 Robby Workman Northport, AL, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +22,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Modified 3/3/2009 by Christopher Walker <kris240376@gmail.com>
+# * added log rotation
+
PRGNAM=apcupsd
-VERSION=3.14.4
+VERSION=3.14.5
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -36,7 +39,7 @@ OUTPUT=${OUTPUT:-/tmp}
# 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.
-CGIPATH=${CGIPATH:-/etc/apcupsd} # Path for cgi executables
+CGIPATH=${CGIPATH:-/var/www/cgi-bin} # Path for cgi executables
DEVICE=${DEVICE:-/dev/usb/hiddev0} # Device node of UPS
UPSTYPE=${UPSTYPE:-usb} # Type of UPS
UPSCABLE=${UPSCABLE:-usb} # Cable type (RJ45<-->USB == USB)
@@ -79,7 +82,6 @@ CXXFLAGS="$SLKCFLAGS" \
--with-cgi-bin=$CGIPATH \
--enable-usb \
--with-libwrap \
- --enable-nls \
--enable-snmp=yes \
--with-upstype=$UPSTYPE \
--with-upscable=$UPSCABLE \
@@ -89,13 +91,18 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING ChangeLog DISCLAIMER Developers INSTALL ReleaseNotes VERIFYING \
- examples doc/* $CWD/README-SLACKWARE $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp -a \
+ COPYING ChangeLog DISCLAIMER Developers INSTALL ReleaseNotes \
+ VERIFYING examples doc/* $CWD/README.SLACKWARE $CWD/$PRGNAM.SlackBuild \
+ $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
find $PKG/usr/doc/$PRGNAM-$VERSION -name "Makefile*" -exec rm {} \;
find $PKG/usr/doc/$PRGNAM-$VERSION -name "*.man" -exec rm {} \;
@@ -112,6 +119,10 @@ install -D -m 0755 platforms/slackware/apcupsd \
install -d -m 0755 $PKG/var/lock/subsys
chmod 1777 $PKG/var/lock
+# Configure logrotate
+mkdir -p $PKG/etc/logrotate.d
+cat $CWD/apcupsd.logrotate > $PKG/etc/logrotate.d/apcupsd.new
+
# Rename config files to *.new so custom changes aren't clobberred
for i in apccontrol apcupsd.conf apcupsd.css changeme commfailure \
commok hosts.conf multimon.conf offbattery onbattery ; do
@@ -124,7 +135,7 @@ done
)
mkdir -p $PKG/install
-sed s/VERSION/$VERSION/ $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 b27dd943ed89..1566ceef6d3b 100644
--- a/system/apcupsd/apcupsd.info
+++ b/system/apcupsd/apcupsd.info
@@ -1,8 +1,8 @@
PRGNAM="apcupsd"
-VERSION="3.14.4"
+VERSION="3.14.5"
HOMEPAGE="http://www.apcupsd.org"
-DOWNLOAD="http://downloads.sourceforge.net/apcupsd/apcupsd-3.14.4.tar.gz"
-MD5SUM="78811129db1a882b9a2b9afd540470b3"
+DOWNLOAD="http://downloads.sourceforge.net/apcupsd/apcupsd-3.14.5.tar.gz"
+MD5SUM="4ac73ec91d8ab56f3fac894e172567c4"
MAINTAINER="Robby Workman"
EMAIL="rw@rlworkman.net"
-APPROVED="David Somero"
+APPROVED="dsomero"
diff --git a/system/apcupsd/apcupsd.logrotate b/system/apcupsd/apcupsd.logrotate
new file mode 100644
index 000000000000..507c9cdaf352
--- /dev/null
+++ b/system/apcupsd/apcupsd.logrotate
@@ -0,0 +1,8 @@
+/var/log/apcupsd.events {
+ rotate 4
+ weekly
+ notifempty
+ postrotate
+ /etc/rc.d/rc.apcupsd restart 1>/dev/null || true
+ endscript
+}
diff --git a/system/apcupsd/doinst.sh b/system/apcupsd/doinst.sh
index 797750001b7c..e4732cd256d1 100644
--- a/system/apcupsd/doinst.sh
+++ b/system/apcupsd/doinst.sh
@@ -1,5 +1,3 @@
-#!/bin/sh
-
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
@@ -31,4 +29,5 @@ config etc/apcupsd/hosts.conf.new
config etc/apcupsd/multimon.conf.new
config etc/apcupsd/offbattery.new
config etc/apcupsd/onbattery.new
+config etc/logrotate.d/apcupsd.new
diff --git a/system/apcupsd/slack-desc b/system/apcupsd/slack-desc
index d853a557ff36..8e7ee00dcb01 100644
--- a/system/apcupsd/slack-desc
+++ b/system/apcupsd/slack-desc
@@ -5,7 +5,7 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler------------------------------------------------------|
apcupsd: apcupsd (APC UPS Daemon)
apcupsd:
apcupsd: Apcupsd can be used for power mangement and controlling most of APC's
@@ -13,7 +13,7 @@ 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: