mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
network/vnstat: Updated for version 1.17 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
4d1c92ec30
commit
ac8a1d798e
3 changed files with 30 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue