summaryrefslogtreecommitdiffstats
path: root/python/pyliblo/pyliblo.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyliblo/pyliblo.SlackBuild')
-rw-r--r--python/pyliblo/pyliblo.SlackBuild41
1 files changed, 12 insertions, 29 deletions
diff --git a/python/pyliblo/pyliblo.SlackBuild b/python/pyliblo/pyliblo.SlackBuild
index 327e7f751a..2176a23f6e 100644
--- a/python/pyliblo/pyliblo.SlackBuild
+++ b/python/pyliblo/pyliblo.SlackBuild
@@ -2,15 +2,18 @@
# Slackware build script for pyliblo
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20230520 bkw: python => python2 (no other changes).
+# 20211202 bkw: BUILD=2, add python3 support.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pyliblo
VERSION=${VERSION:-0.10.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -22,9 +25,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -34,20 +34,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -57,21 +43,18 @@ rm -rf $PRGNAM-$VERSION
tar xvf $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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+python2 setup.py install --root=$PKG
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG/usr/lib* -name '*.so' -exec strip {} \+
mv $PKG/usr/share/man $PKG/usr/man
rmdir $PKG/usr/share
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+gzip -9 $PKG/usr/man/man?/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING NEWS PKG-INFO README $PKG/usr/doc/$PRGNAM-$VERSION