libraries/batinfo: Updated for version 0.3.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Philip Lacroix 2015-05-08 22:41:50 +07:00 committed by Willy Sudiarto Raharjo
parent 51a59850a5
commit 5b0ab2fa67
4 changed files with 20 additions and 19 deletions

View file

@ -1,3 +1,3 @@
Batinfo is a simple Python library to retrieve battery information on
Linux-based operating systems. No ACPI or external software are needed:
only the Linux kernel and its /sys/class/power_supply folder.
batinfo is a simple Python library to retrieve battery information on operating
systems based on Linux. No ACPI or external software are needed: only the Linux
kernel and its /sys/class/power_supply folder.

View file

@ -1,6 +1,6 @@
#!/bin/sh
# Slackware build script for Batinfo
# Slackware build script for batinfo
# Copyright 2015 Philip Lacroix <philnx at posteo dot de>
# All rights reserved.
@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=batinfo
VERSION=${VERSION:-2.0}
VERSION=${VERSION:-0.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -47,8 +47,8 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
# The upstream tarball will be named differently, depending on the file being
# downloaded manually (web browser) or with wget.
# The upstream tarball will be named differently, depending on
# the file being downloaded manually (web browser) or with wget.
if [ -e $CWD/v$VERSION.tar.gz ]; then
tar xvzf $CWD/v$VERSION.tar.gz
else
@ -63,9 +63,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
PRGUSR=$PKG/usr
PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
python setup.py install --root=$PKG
# Python 3 support.
@ -73,13 +70,17 @@ if $(python3 -c 'import sys' 2>/dev/null); then
python3 setup.py install --root=$PKG
fi
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
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
PRGSHR=$PKG/usr/share
PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
# Install documentation.
mkdir -p $PRGDOC
mv $PRGUSR/share/doc/$PRGNAM/* $PRGDOC/
rm -rf $PRGUSR/share
mv $PRGSHR/doc/$PRGNAM/* $PRGDOC/
cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
rm -rf $PRGSHR
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

View file

@ -1,8 +1,8 @@
PRGNAM="batinfo"
VERSION="2.0"
VERSION="0.3"
HOMEPAGE="https://github.com/nicolargo/batinfo"
DOWNLOAD="https://github.com/nicolargo/batinfo/archive/v2.0.tar.gz"
MD5SUM="8141dd80df7e71de0396818142ecc39c"
DOWNLOAD="https://github.com/nicolargo/batinfo/archive/v0.3.tar.gz"
MD5SUM="90d1672be9999f728ee9914d3a055b19"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="pysetuptools"

View file

@ -6,9 +6,9 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
batinfo: Batinfo (Python library to retrieve battery information)
batinfo: batinfo (Python library to retrieve battery information)
batinfo:
batinfo: Batinfo is a simple Python library to retrieve battery information
batinfo: batinfo is a simple Python library to retrieve battery information
batinfo: on Linux-based operating systems. No ACPI or external software are
batinfo: needed: only the Linux kernel and its /sys/class/power_supply folder.
batinfo: