system/apcupsd: Updated for version 3.14.5

This commit is contained in:
Robby Workman 2010-05-12 17:44:57 +02:00 committed by David Somero
parent 7e7696327c
commit 440b72989b
7 changed files with 37 additions and 19 deletions

View file

@ -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.

View file

@ -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

View file

@ -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"

View file

@ -0,0 +1,8 @@
/var/log/apcupsd.events {
rotate 4
weekly
notifempty
postrotate
/etc/rc.d/rc.apcupsd restart 1>/dev/null || true
endscript
}

View file

@ -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

View file

@ -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: