system/glances: Updated for version 1.7.4.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Philip Lacroix 2014-03-11 20:53:39 +07:00 committed by Erik Hanson
parent a37fc6bd03
commit 7c593e1850
4 changed files with 23 additions and 21 deletions

View File

@ -12,6 +12,6 @@ statistical values from key elements, like CPU, load average, memory,
network, disks, file systems, processes, etc. network, disks, file systems, processes, etc.
Optional dependencies are Jinja2 (for HTML output), hddtemp (for HHD Optional dependencies are Jinja2 (for HTML output), hddtemp (for HHD
temperature monitoring support) and python3. temperature monitoring support) and python3. Others not available on SBo
Others not available on SBo are pysensors (for HW monitoring support) are pysensors (for HW monitoring support) and batinfo (for battery
and batinfo (for battery monitoring support). monitoring support).

View File

@ -1,14 +1,11 @@
config() { config() {
NEW="$1" NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)" OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then if [ ! -r $OLD ]; then
mv $NEW $OLD mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW rm $NEW
fi fi
# Otherwise, we leave the .new copy for the admin to consider...
} }
config etc/glances/glances.conf.new config etc/glances/glances.conf.new

View File

@ -2,7 +2,7 @@
# Slackware build script for glances # Slackware build script for glances
# Copyright 2013 Philip Lacroix <philnx at bluebottle dot com> # Copyright 2013-2014 Philip Lacroix <philnx at bluebottle dot com>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use of this script, with or without modification, is # Redistribution and use of this script, with or without modification, is
@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=glances PRGNAM=glances
VERSION=${VERSION:-1.7.2} VERSION=${VERSION:-1.7.4}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -46,7 +46,8 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM-$VERSION rm -rf $PRGNAM-$VERSION
tar xvf $CWD/v$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz tar xvf $CWD/v$VERSION.tar.gz
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
@ -55,6 +56,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \; -exec chmod 644 {} \;
PRGUSR=$PKG/usr
PRGETC=$PKG/etc/$PRGNAM
PRGSHR=$PKG/usr/share
PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
python setup.py install --root=$PKG python setup.py install --root=$PKG
# Python 3 support # Python 3 support
@ -62,19 +68,18 @@ if $(python3 -c 'import sys' 2>/dev/null); then
python3 setup.py install --root=$PKG python3 setup.py install --root=$PKG
fi fi
# Don't clobber configuration files
mv $PKG/etc/$PRGNAM/$PRGNAM.conf $PKG/etc/$PRGNAM/$PRGNAM.conf.new
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mv $PKG/usr/share/man $PKG/usr/ mv $PRGETC/$PRGNAM.conf $PRGETC/$PRGNAM.conf.new
gzip -9 $PKG/usr/man/man?/*.?
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PRGSHR/man $PKG/usr/
mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION gzip -9 $PRGUSR/man/man?/*.?
rm -rf $PKG/usr/share/doc
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PRGDOC
mv $PRGSHR/doc/$PRGNAM/* $PRGDOC/
rm -rf $PRGSHR
cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc

View File

@ -1,8 +1,8 @@
PRGNAM="glances" PRGNAM="glances"
VERSION="1.7.2" VERSION="1.7.4"
HOMEPAGE="https://github.com/nicolargo/glances" HOMEPAGE="https://github.com/nicolargo/glances"
DOWNLOAD="https://github.com/nicolargo/glances/archive/v1.7.2.tar.gz" DOWNLOAD="https://github.com/nicolargo/glances/archive/v1.7.4.tar.gz"
MD5SUM="71fe3c9be2490095e8eeb07f172ffe2e" MD5SUM="2062e70326f4c2eb9595c53c59d55047"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="psutil pysetuptools" REQUIRES="psutil pysetuptools"