diff options
Diffstat (limited to 'python/python-emoji/python-emoji.SlackBuild')
-rw-r--r-- | python/python-emoji/python-emoji.SlackBuild | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/python/python-emoji/python-emoji.SlackBuild b/python/python-emoji/python-emoji.SlackBuild index 173f4d3870..9b4eb57667 100644 --- a/python/python-emoji/python-emoji.SlackBuild +++ b/python/python-emoji/python-emoji.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for python-emoji -# Copyright 2018-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> +# Copyright 2018-2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,11 +22,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -SRCNAM=emoji -PRGNAM=python-$SRCNAM -VERSION=${VERSION:-0.5.4} +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=python-emoji +VERSION=${VERSION:-1.2.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +SRCNAM=emoji if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,7 +40,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} @@ -60,9 +71,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$VERSION.tar.gz -cd $SRCNAM-$VERSION +rm -rf $SRCNAM-v.$VERSION +tar xvf $CWD/$SRCNAM-v.$VERSION.tar.gz +cd $SRCNAM-v.$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -70,7 +81,6 @@ 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 {} \; -python2 setup.py install --root=$PKG python3 setup.py install --root=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ @@ -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 |