mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
system/apcupsd: Updated for version 3.14.10.
This commit also enables gapcmon in configure. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
62d708f8c3
commit
f828e6ed50
4 changed files with 29 additions and 22 deletions
|
@ -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.8/README.SLACKWARE for more
|
||||
After installing, see /usr/doc/apcupsd-3.14.10/README.SLACKWARE for more
|
||||
information on how to modify rc.6 and how to start the apcupsd daemon
|
||||
automatically at boot.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Slackware build script for apcupsd
|
||||
|
||||
# Copyright 2006-2011 Robby Workman Northport, AL, USA
|
||||
# Copyright 2006-2012 Robby Workman Northport, AL, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -26,7 +26,7 @@
|
|||
# * added log rotation
|
||||
|
||||
PRGNAM=apcupsd
|
||||
VERSION=3.14.9
|
||||
VERSION=${VERSION:-3.14.10}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -43,14 +43,6 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
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:-/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)
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
|
@ -76,6 +68,10 @@ cd $PRGNAM-$VERSION
|
|||
chown -R root:root .
|
||||
chmod -R a-s,u+w,go+r-w .
|
||||
|
||||
# Create /var/lock/subsys in the init script (rc.apcupsd)
|
||||
# These days, /var/lock may be on a tmpfs, so we can't assume the dir is there
|
||||
patch -p1 < $CWD/create_lockdir_in_init_script.diff
|
||||
|
||||
# The "--disable-install-distdir" is important - don't remove it.
|
||||
# If you enable the distribution-specific install, then apcupsd will attempt
|
||||
# to patch the /etc/rc.d/rc.6 script on your system. This may be acceptable
|
||||
|
@ -97,15 +93,19 @@ CXXFLAGS="$SLKCFLAGS -DNETSNMP_NO_LEGACY_DEFINITIONS=1" \
|
|||
--sysconfdir=/etc/apcupsd \
|
||||
--disable-install-distdir \
|
||||
--enable-cgi \
|
||||
--with-cgi-bin=$CGIPATH \
|
||||
--with-cgi-bin=${CGIPATH:-/var/www/cgi-bin} \
|
||||
--enable-usb \
|
||||
--with-libwrap \
|
||||
--enable-snmp=yes \
|
||||
--with-upstype=$UPSTYPE \
|
||||
--with-upscable=$UPSCABLE \
|
||||
--with-dev=$DEVICE \
|
||||
--enable-gapcmon \
|
||||
--with-upstype=${UPSTYPE:-usb} \
|
||||
--with-upscable=${UPSCABLE:-usb} \
|
||||
--build=$ARCH-slackware-linux
|
||||
|
||||
# Deprecated option - shouldn't be needed due to autodetection
|
||||
# --with-dev=${DEVICE:-/dev/usb/hiddev0}
|
||||
# Also, UPSCABLE refers to cable type (e.g. RJ45<-->USB = USB)
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
|
@ -119,10 +119,6 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
|
|||
install -D -m 0755 platforms/slackware/apcupsd \
|
||||
$PKG/etc/rc.d/rc.apcupsd.new
|
||||
|
||||
# Create the /var/lock/subsys directory
|
||||
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
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="apcupsd"
|
||||
VERSION="3.14.9"
|
||||
VERSION="3.14.10"
|
||||
HOMEPAGE="http://www.apcupsd.org"
|
||||
DOWNLOAD="http://downloads.sourceforge.net/apcupsd/apcupsd-3.14.9.tar.gz"
|
||||
MD5SUM="aa5e2c2954a81c2f07e0a356e38fe853"
|
||||
DOWNLOAD="http://downloads.sourceforge.net/apcupsd/apcupsd-3.14.10.tar.gz"
|
||||
MD5SUM="5928822d855c5cf7ac29655e3e0b8c23"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
11
system/apcupsd/create_lockdir_in_init_script.diff
Normal file
11
system/apcupsd/create_lockdir_in_init_script.diff
Normal file
|
@ -0,0 +1,11 @@
|
|||
diff -Nur apcupsd-3.14.10.orig/platforms/slackware/apcupsd.in apcupsd-3.14.10/platforms/slackware/apcupsd.in
|
||||
--- apcupsd-3.14.10.orig/platforms/slackware/apcupsd.in 2005-03-03 11:18:09.000000000 -0600
|
||||
+++ apcupsd-3.14.10/platforms/slackware/apcupsd.in 2012-09-07 21:31:27.347857464 -0500
|
||||
@@ -20,6 +20,7 @@
|
||||
if [ -f ${APCPID} ]; then
|
||||
return=" Already running."
|
||||
else
|
||||
+ mkdir -p @LOCKDIR@/subsys
|
||||
@sbindir@/apcupsd && touch @LOCKDIR@/subsys/apcupsd \
|
||||
|| return=" Failed."
|
||||
fi
|
Loading…
Reference in a new issue