summaryrefslogtreecommitdiffstats
path: root/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2021-10-19 18:36:19 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:16 +0700
commit24d27c9175b02474d70c9b145f4bf2d5a4834877 (patch)
treecbf318c37fa62ecb738e209e7335a8edef2dfac3 /games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild
parent817876646be5a705915fd2895ae8a27203084329 (diff)
downloadslackbuilds-24d27c9175b02474d70c9b145f4bf2d5a4834877.tar.gz
slackbuilds-24d27c9175b02474d70c9b145f4bf2d5a4834877.tar.xz
games/jezzball-kazzmir: Fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild')
-rw-r--r--games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild47
1 files changed, 31 insertions, 16 deletions
diff --git a/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild b/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild
index 96ff797a4f..5de311229d 100644
--- a/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild
+++ b/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild
@@ -10,11 +10,16 @@
# stable (random-looking hostnames). Homepage is the allegro.cc game depot
# entry for this game, since the original homepage is defunct.
+# 20211019 bkw: BUILD=3
+# - fix -current build.
+# - new-style icons.
+# - man page.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jezzball-kazzmir
VERSION=${VERSION:-1.1}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -26,9 +31,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -69,11 +71,8 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$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 \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# 20151122 bkw: use allegro4's loadpng instead of the bundled one. fixes
# build on -current, does no harm on 14.1.
@@ -82,9 +81,6 @@ patch -p1 < $CWD/loadpng.diff
sed -i 's,\./data\|data/,'"$DATADIR"',' src/main.cpp
sed -i 's,score\.jzb,'$SCOREDIR'/&,' src/score.cpp
-# link fix, plus use our cflags
-sed -i -e "s,-O2,$SLKCFLAGS," -e 's,jpgal,jpgalleg,' SConstruct
-
# fix globbing
sed -i 's,FA_ARCH,FA_ALL,' src/main.cpp
@@ -97,7 +93,12 @@ sed -i '1i#include <string.h>' src/region.cpp
# the unpatched game *is* nonfunctional because it's too annoying to play.
patch -p1 < $CWD/insults.diff
-scons
+# 20211019 bkw: Slackware pre-15.0 -current's scons doesn't like the
+# SConstruct from this old project. I *hate* scons. Seriously. This
+# project is small enough it'd be better off with a simple
+# Makefile. So I wrote one.
+cat $CWD/Makefile > Makefile
+make OPTFLAGS="$SLKCFLAGS"
# manual install
mkdir -p $PKG/usr/games $PKG/$DATADIR
@@ -115,14 +116,28 @@ install -oroot -groot -m0644 pics/*.png $PKG/$DATADIR/pics
# world-writable scorefile. The dir it's in is only writable by root,
# the game can't create the scorefile if it's missing, so we have to
# include the stock one in the package (which the game can and will
-# modify as needed).
+# modify as needed). Note that this can't usefully be installed as a
+# .new config file, because slackpkg doesn't look in /var/games for
+# those (so the user will never be prompted for it).
mkdir -p $PKG/$SCOREDIR
zcat $CWD/score.jzb.gz > $PKG/$SCOREDIR/score.jzb
chmod 666 $PKG/$SCOREDIR/score.jzb
-# icon made with the gimp, from a screenshot of the game
+# icons made with the gimp, from screenshots of the game
+for i in $CWD/icons/*.png; do
+ px=$( basename $i | cut -d. -f1 )
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cat $i > $dir/$PRGNAM.png
+done
+
mkdir -p $PKG/usr/share/pixmaps
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# man page written for this build
+mkdir -p $PKG/usr/man/man6
+gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
# .desktop file written for this build
mkdir -p $PKG/usr/share/applications