aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-20 13:12:06 -0500
committerRobby Workman <rworkman@slackbuilds.org>2022-02-21 14:34:27 -0600
commit94efcd10f448aa3d6c2319522ba722888845d3a8 (patch)
tree63f98db791f64f74c67a074ef277b0f4a0278e4a /games
parentb58a0647f714d4fff3a98a828f312fff4c75e5e9 (diff)
games/fortune-dharma: Handle weird source filename.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games')
-rw-r--r--games/fortune-dharma/fortune-dharma.SlackBuild16
1 files changed, 10 insertions, 6 deletions
diff --git a/games/fortune-dharma/fortune-dharma.SlackBuild b/games/fortune-dharma/fortune-dharma.SlackBuild
index 2dca054eb22f..1d087abd84bc 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