diff options
Diffstat (limited to 'python/testpath/testpath.SlackBuild')
-rw-r--r-- | python/testpath/testpath.SlackBuild | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/python/testpath/testpath.SlackBuild b/python/testpath/testpath.SlackBuild index 3a8e585db1..a34686e754 100644 --- a/python/testpath/testpath.SlackBuild +++ b/python/testpath/testpath.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for testpath -# Copyright 2017-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> +# Copyright 2017-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> +# Copyright 2022 Isaac Yu <isaacyu@protonmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +23,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=testpath -VERSION=${VERSION:-0.4.4} -BUILD=${BUILD:-1} +VERSION=${VERSION:-0.6.0} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +39,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -69,16 +80,15 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -cp $CWD/setup.py . -python2 setup.py install --root=$PKG -python3 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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - README.rst \ + LICENSE PKG-INFO README.rst \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -86,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 |