diff options
-rw-r--r-- | network/vnstat/doinst.sh | 18 | ||||
-rw-r--r-- | network/vnstat/vnstat.SlackBuild | 20 | ||||
-rw-r--r-- | network/vnstat/vnstat.info | 10 |
3 files changed, 30 insertions, 18 deletions
diff --git a/network/vnstat/doinst.sh b/network/vnstat/doinst.sh index 052e2f8929..5806a5036d 100644 --- a/network/vnstat/doinst.sh +++ b/network/vnstat/doinst.sh @@ -11,12 +11,16 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms on rc.vnstat.new: -if [ -e etc/rc.d/rc.vnstat ]; then - cp -a etc/rc.d/rc.vnstat etc/rc.d/rc.vnstat.new.incoming - cat etc/rc.d/rc.vnstat.new > etc/rc.d/rc.vnstat.new.incoming - mv etc/rc.d/rc.vnstat.new.incoming etc/rc.d/rc.vnstat.new -fi +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} -config etc/rc.d/rc.vnstat.new +preserve_perms etc/rc.d/rc.vnstat.new config etc/vnstat.conf.new diff --git a/network/vnstat/vnstat.SlackBuild b/network/vnstat/vnstat.SlackBuild index f1cf91a1f5..cbc350e199 100644 --- a/network/vnstat/vnstat.SlackBuild +++ b/network/vnstat/vnstat.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for vnstat # Copyright 2007-2009 Michiel van Wessem, Manchester, United Kingdom. +# Copyright 2017 Willy Sudiarto Raharjo <willysr@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,16 +23,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Modified by Mario Preksavec <mario@slackware.hr> - PRGNAM=vnstat -VERSION=${VERSION:-1.13} +VERSION=${VERSION:-1.17} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,8 +41,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -73,6 +72,15 @@ set -e CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + make all make install DESTDIR=$PKG MAN=$PKG/usr/man diff --git a/network/vnstat/vnstat.info b/network/vnstat/vnstat.info index daf97f8c9f..51ff631b49 100644 --- a/network/vnstat/vnstat.info +++ b/network/vnstat/vnstat.info @@ -1,10 +1,10 @@ PRGNAM="vnstat" -VERSION="1.13" +VERSION="1.17" HOMEPAGE="http://humdi.net/vnstat/" -DOWNLOAD="http://humdi.net/vnstat/vnstat-1.13.tar.gz" -MD5SUM="6bf81e670d8ec17cf365da2d2acf981e" +DOWNLOAD="http://humdi.net/vnstat/vnstat-1.17.tar.gz" +MD5SUM="8de1c7e40806509943804bb4b26f5409" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Michiel van Wessem" -EMAIL="michiel@slackbuilds.org" +MAINTAINER="Willy Sudiarto Raharjo" +EMAIL="willysr@slackbuilds.org" |