summaryrefslogtreecommitdiffstats
path: root/games/fortune-dharma/fortune-dharma.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/fortune-dharma/fortune-dharma.SlackBuild')
-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 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