summaryrefslogtreecommitdiffstats
path: root/python/py-cpuinfo/py-cpuinfo.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/py-cpuinfo/py-cpuinfo.SlackBuild')
-rw-r--r--python/py-cpuinfo/py-cpuinfo.SlackBuild24
1 files changed, 12 insertions, 12 deletions
diff --git a/python/py-cpuinfo/py-cpuinfo.SlackBuild b/python/py-cpuinfo/py-cpuinfo.SlackBuild
index 297deebfe2..5c9ebe097f 100644
--- a/python/py-cpuinfo/py-cpuinfo.SlackBuild
+++ b/python/py-cpuinfo/py-cpuinfo.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for py-cpuinfo
-# Copyright 2017 Philip Lacroix <slackph at posteo dot de>
+# Copyright 2017-2021 Philip Lacroix <slackph at posteo dot de>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +23,10 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=py-cpuinfo
-VERSION=${VERSION:-20170112}
+VERSION=${VERSION:-7.0.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Source ID (GitHub).
-SRCVER=${SRCVER:-c07382c374f4c400f0f2796d81c17e271350e543}
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -48,19 +45,22 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$SRCVER
-tar xvzf $CWD/$PRGNAM-$SRCVER.tar.gz
-
-cd $PRGNAM-$SRCVER
+rm -rf $PRGNAM-$VERSION
+tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
- -o -perm 400 \) -exec chmod 644 {} \;
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
python setup.py install --root=$PKG
+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
@@ -68,7 +68,7 @@ PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
# Install documentation.
mkdir -p $PRGDOC
-cp -a ChangeLog LICENSE README.md $PRGDOC/
+cp -a ChangeLog LICENSE README.md example $PRGDOC/
cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install