diff options
Diffstat (limited to 'games/snes9x2010/snes9x2010.SlackBuild')
-rw-r--r-- | games/snes9x2010/snes9x2010.SlackBuild | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/games/snes9x2010/snes9x2010.SlackBuild b/games/snes9x2010/snes9x2010.SlackBuild index 4a89a5c969..b6113dcb95 100644 --- a/games/snes9x2010/snes9x2010.SlackBuild +++ b/games/snes9x2010/snes9x2010.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for snes9x2010 # Copyright 2016-2018 Hunter Sezen California, USA +# Copyright 2020-2023 ilmich < ardutu at gmail dot com > # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,11 +23,15 @@ # 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=snes9x2010 LIBNAM=${PRGNAM}_libretro -VERSION=${VERSION:-2018.10.11_d857a31} +VERSION=${VERSION:-2022.07.25_e86e546} +COMMIT=e86e54624a7910a64a9a744e3734d4067c48d240 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,7 +41,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} @@ -44,16 +56,14 @@ OUTPUT=${OUTPUT:-/tmp} LIBDIRSUFFIX= [ "$ARCH" = x86_64 ] && LIBDIRSUFFIX=64 -GRIFFIN=${GRIFFIN:-0} - set -eu rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -cd $PRGNAM-$VERSION +rm -rf ${PRGNAM/-/_}-$COMMIT +tar xvf $CWD/${PRGNAM/-/_}-$COMMIT.tar.gz +cd ${PRGNAM/-/_}-$COMMIT chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -63,10 +73,10 @@ find -L . \ [ "${DEBUG:=0}" != 0 ] && DEBUG=1 -make -f Makefile.libretro DEBUG=$DEBUG HAVE_GRIFFIN="$GRIFFIN" +make -f Makefile.libretro DEBUG=$DEBUG -install -Dm0644 $LIBNAM.so $PKG/usr/lib${LIBDIRSUFFIX}/libretro/$LIBNAM.so -install -Dm0644 $LIBNAM.info $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info/$LIBNAM.info +install -Dm0755 $LIBNAM.so $PKG/usr/lib${LIBDIRSUFFIX}/libretro/$LIBNAM.so +install -Dm0644 $CWD/$LIBNAM.info $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info/$LIBNAM.info if [ $DEBUG = 0 ]; then find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ @@ -81,4 +91,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 |