aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/apcupsd/README2
-rw-r--r--system/apcupsd/README-SLACKWARE2
-rw-r--r--system/apcupsd/apcupsd.SlackBuild31
-rw-r--r--system/apcupsd/apcupsd.info8
-rw-r--r--system/apcupsd/doinst.sh31
-rw-r--r--system/apcupsd/slack-desc2
6 files changed, 37 insertions, 39 deletions
diff --git a/system/apcupsd/README b/system/apcupsd/README
index 028579ed5eb9..a5aafec1fc4f 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.3/README-SLACKWARE for more
+After installing, see /usr/doc/apcupsd-3.14.4/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 f61c7ca3c910..9587d0e26be0 100644
--- a/system/apcupsd/README-SLACKWARE
+++ b/system/apcupsd/README-SLACKWARE
@@ -41,7 +41,7 @@ chose to comment out the original):
# of seconds (see the apcupsd.conf file). This is important for situations
# where the mains power comes back before the UPS batteries are completely
# dead.
- if [ -f /etc/powerfail ]; then
+ if [ -f /etc/apcupsd/powerfail ]; then
echo
echo "apcupsd will now power off the UPS"
echo
diff --git a/system/apcupsd/apcupsd.SlackBuild b/system/apcupsd/apcupsd.SlackBuild
index b0c7ff7b0292..af4edb58ae74 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 (http://rlworkman.net)
+# Copyright 2006-2008 Robby Workman Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=apcupsd
-VERSION=3.14.3
+VERSION=3.14.4
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -36,6 +36,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
DEVICE=${DEVICE:-/dev/usb/hiddev0} # Device node of UPS
UPSTYPE=${UPSTYPE:-usb} # Type of UPS
UPSCABLE=${UPSCABLE:-usb} # Cable type (RJ45<-->USB == USB)
@@ -44,6 +45,8 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
set -e
@@ -73,27 +76,30 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc/apcupsd \
--disable-install-distdir \
--enable-cgi \
- --with-cgi-bin=/etc/apcupsd \
+ --with-cgi-bin=$CGIPATH \
--enable-usb \
- --enable-powerflute \
--with-libwrap \
--enable-nls \
--enable-snmp=yes \
--with-upstype=$UPSTYPE \
--with-upscable=$UPSCABLE \
- --with-dev=$DEVICE
+ --with-dev=$DEVICE \
+ --build=$ARCH-slackware-linux
make
-make install-strip DESTDIR=$PKG
+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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- ABOUT-NLS COPYING ChangeLog* DISCLAIMER Developers INSTALL ReleaseNotes \
- VERIFYING examples doc/* $CWD/README-SLACKWARE $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
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 {} \;
+chown -R root:root $PKG/usr/doc
# Install the apctest man page - it's not done automatically for some reason
install -m 0644 doc/apctest.man $PKG/usr/man/man8/apctest.8
@@ -107,9 +113,8 @@ 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 \
- commfailure commok hosts.conf multimon.cgi multimon.conf \
- offbattery onbattery upsfstats.cgi upsimage.cgi upsstats.cgi ; do
+for i in apccontrol apcupsd.conf apcupsd.css changeme commfailure \
+ commok hosts.conf multimon.conf offbattery onbattery ; do
mv $PKG/etc/apcupsd/$i $PKG/etc/apcupsd/$i.new;
done
diff --git a/system/apcupsd/apcupsd.info b/system/apcupsd/apcupsd.info
index a0819fe98f06..b27dd943ed89 100644
--- a/system/apcupsd/apcupsd.info
+++ b/system/apcupsd/apcupsd.info
@@ -1,8 +1,8 @@
PRGNAM="apcupsd"
-VERSION="3.14.3"
+VERSION="3.14.4"
HOMEPAGE="http://www.apcupsd.org"
-DOWNLOAD="http://downloads.sourceforge.net/apcupsd/apcupsd-3.14.3.tar.gz"
-MD5SUM="a212351d21828e9344264614c7ad8ba1"
+DOWNLOAD="http://downloads.sourceforge.net/apcupsd/apcupsd-3.14.4.tar.gz"
+MD5SUM="78811129db1a882b9a2b9afd540470b3"
MAINTAINER="Robby Workman"
EMAIL="rw@rlworkman.net"
-APPROVED="Alan_Hicks,Erik Hanson"
+APPROVED="David Somero"
diff --git a/system/apcupsd/doinst.sh b/system/apcupsd/doinst.sh
index 066579eb4b0e..797750001b7c 100644
--- a/system/apcupsd/doinst.sh
+++ b/system/apcupsd/doinst.sh
@@ -1,3 +1,5 @@
+#!/bin/sh
+
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
@@ -11,25 +13,6 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-for i in \
- apccontrol.new \
- apcupsd.conf.new \
- apcupsd.css.new \
- changeme.new \
- commfailure.new \
- commok.new \
- hosts.conf.new \
- multimon.cgi.new \
- multimon.conf.new \
- offbattery.new \
- onbattery.new \
- upsfstats.cgi.new \
- upsimage.cgi.new \
- upsstats.cgi.new;
-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
@@ -38,4 +21,14 @@ if [ -e etc/rc.d/rc.apcupsd ]; then
fi
config etc/rc.d/rc.apcupsd.new
+config etc/apcupsd/apccontrol.new
+config etc/apcupsd/apcupsd.conf.new
+config etc/apcupsd/apcupsd.css.new
+config etc/apcupsd/changeme.new
+config etc/apcupsd/commfailure.new
+config etc/apcupsd/commok.new
+config etc/apcupsd/hosts.conf.new
+config etc/apcupsd/multimon.conf.new
+config etc/apcupsd/offbattery.new
+config etc/apcupsd/onbattery.new
diff --git a/system/apcupsd/slack-desc b/system/apcupsd/slack-desc
index 847312d3cfdd..d853a557ff36 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