aboutsummaryrefslogtreecommitdiff
path: root/system/apcupsd/apcupsd.SlackBuild
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/apcupsd.SlackBuild
parent26c4dd962086c59d6571068ce10179cf190991ce (diff)
system/apcupsd: Updated for version 3.14.3
Diffstat (limited to 'system/apcupsd/apcupsd.SlackBuild')
-rw-r--r--system/apcupsd/apcupsd.SlackBuild27
1 files changed, 11 insertions, 16 deletions
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