diff options
Diffstat (limited to 'libraries/pylast/pylast.SlackBuild')
-rw-r--r-- | libraries/pylast/pylast.SlackBuild | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/libraries/pylast/pylast.SlackBuild b/libraries/pylast/pylast.SlackBuild index 3c333b28e1..3f3f1c001e 100644 --- a/libraries/pylast/pylast.SlackBuild +++ b/libraries/pylast/pylast.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for pylast -# Copyright 2014-2019 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2022-23 fourtysixandtwo <fourtysixandtwo@sliderr.net> +# Copyright 2014-2021 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +23,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20221029 46and2: Updated version, build process changed. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=pylast -VERSION=${VERSION:-2.4.0} # This is the last verion that is compatible -BUILD=${BUILD:-1} # with Python 2 +VERSION=${VERSION:-5.2.0} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +41,11 @@ 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} @@ -49,14 +59,14 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi -PYTHON=python -[ "${PYTHON3:-no}" = "yes" ] && PYTHON=python3 - set -e rm -rf $PKG @@ -68,11 +78,12 @@ 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 \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ -$PYTHON setup.py install --root=$PKG +python3 -m build --no-isolation +python3 -m installer -d "$PKG" dist/*.whl 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 @@ -85,4 +96,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 |