diff options
Diffstat (limited to 'games/QuickNES-Core/QuickNES-Core.SlackBuild')
-rw-r--r-- | games/QuickNES-Core/QuickNES-Core.SlackBuild | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/games/QuickNES-Core/QuickNES-Core.SlackBuild b/games/QuickNES-Core/QuickNES-Core.SlackBuild index 43d394f68a..dfeccb7e12 100644 --- a/games/QuickNES-Core/QuickNES-Core.SlackBuild +++ b/games/QuickNES-Core/QuickNES-Core.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for QuickNES-Core -# Copyright 2016-2018 Hunter Sezen +# Copyright 2020 ilmich < ardutu at gmail dot com> # 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. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=QuickNES-Core LIBNAM=quicknes_libretro -VERSION=${VERSION:-2018.09.30_264639f} +VERSION=${VERSION:-2022.07.25.1b88a09} +COMMIT=1b88a09f1c386ff9ee46bb371583ae04c5cb5dd0 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} 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} @@ -49,9 +60,9 @@ 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 \ @@ -61,10 +72,10 @@ find -L . \ [ "${DEBUG:=0}" != 0 ] && DEBUG=1 -make DEBUG=$DEBUG GIT_VERSION="${VERSION#*_}" +make -f Makefile 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 \ @@ -72,10 +83,11 @@ if [ $DEBUG = 0 ]; then fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild 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 |