From 94efcd10f448aa3d6c2319522ba722888845d3a8 Mon Sep 17 00:00:00 2001 From: B. Watson Date: Sun, 20 Feb 2022 13:12:06 -0500 Subject: games/fortune-dharma: Handle weird source filename. Signed-off-by: B. Watson --- games/fortune-dharma/fortune-dharma.SlackBuild | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'games/fortune-dharma') diff --git a/games/fortune-dharma/fortune-dharma.SlackBuild b/games/fortune-dharma/fortune-dharma.SlackBuild index 2dca054eb2..1d087abd84 100644 --- a/games/fortune-dharma/fortune-dharma.SlackBuild +++ b/games/fortune-dharma/fortune-dharma.SlackBuild @@ -33,9 +33,6 @@ PKGTYPE=${PKGTYPE:-tgz} ARCH=noarch -# 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 @@ -47,18 +44,25 @@ OUTPUT=${OUTPUT:-/tmp} set -e +# 20220220 bkw: depending on what client was used to download the file, +# it may have CGI parameters in the filename. +TARBALL=$CWD/$PRGNAM-$VERSION.tar.gz +if [ ! -e $TARBALL ]; then + TARBALL="$( /bin/ls $TARBALL\?* | head -1 )" +fi + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf "$TARBALL" 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 \ + -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + -exec chmod 644 {} \+ make all make install DESTDIR=$PKG -- cgit v1.2.3