diff options
Diffstat (limited to 'system/apcupsd/apcupsd.SlackBuild')
-rw-r--r-- | system/apcupsd/apcupsd.SlackBuild | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/system/apcupsd/apcupsd.SlackBuild b/system/apcupsd/apcupsd.SlackBuild index af4edb58ae..eff23168bb 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 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 |