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.SlackBuild51
1 files changed, 22 insertions, 29 deletions
diff --git a/python/pyliblo/pyliblo.SlackBuild b/python/pyliblo/pyliblo.SlackBuild
index 786861fc10..2176a23f6e 100644
--- a/python/pyliblo/pyliblo.SlackBuild
+++ b/python/pyliblo/pyliblo.SlackBuild
@@ -1,15 +1,21 @@
-#!/bin/sh
+#!/bin/bash
# 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}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -19,25 +25,15 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
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
@@ -47,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
@@ -71,4 +64,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE