diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2012-09-07 21:37:29 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-09-07 21:37:29 -0500 |
commit | f828e6ed502aeb0234d7bed789ad8c338545a064 (patch) | |
tree | a92b729cdc6019dac9a71da52427548f4ae83740 /system/apcupsd/apcupsd.SlackBuild | |
parent | 62d708f8c37415b496821f1a53daaae659941967 (diff) |
system/apcupsd: Updated for version 3.14.10.
This commit also enables gapcmon in configure.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/apcupsd/apcupsd.SlackBuild')
-rw-r--r-- | system/apcupsd/apcupsd.SlackBuild | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/system/apcupsd/apcupsd.SlackBuild b/system/apcupsd/apcupsd.SlackBuild index a4a5c3a017a1d..c568edc606091 100644 --- a/system/apcupsd/apcupsd.SlackBuild +++ b/system/apcupsd/apcupsd.SlackBuild @@ -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 |