summaryrefslogtreecommitdiffstats
path: root/games/cosmic_assault/cosmic_assault.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/cosmic_assault/cosmic_assault.SlackBuild')
-rw-r--r--games/cosmic_assault/cosmic_assault.SlackBuild31
1 files changed, 27 insertions, 4 deletions
diff --git a/games/cosmic_assault/cosmic_assault.SlackBuild b/games/cosmic_assault/cosmic_assault.SlackBuild
index a6782f51ce..b09074ffd6 100644
--- a/games/cosmic_assault/cosmic_assault.SlackBuild
+++ b/games/cosmic_assault/cosmic_assault.SlackBuild
@@ -2,15 +2,22 @@
# Slackware build script for cosmic_assault
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20230107 bkw: BUILD=3, fix icon size.
+# 20211228 bkw: BUILD=2.
+# - convert .mod music to .ogg, since -current's SDL2_mixer (and thus
+# pygame) utterly lack MOD music support.
+# - use pygame.SCALED to scale the game to the desktop resolution.
+# - new-style icon.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cosmic_assault
VERSION=${VERSION:-1.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,6 +46,20 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# 20211228 bkw: this makes the game behave better as a fullscreen app.
+sed -i '/winstyle/s,FULLSCREEN,pygame.SCALED | pygame.FULLSCREEN,' $PRGNAM.py
+
+# 20211228 bkw: no tracker music support in SDL2_mixer (yet?). This
+# workaround is OK, but it bloats the package by 500% (from ~1MB to
+# ~5MB, which is still not so large by modern standards).
+sed -i \
+ -e 's,jene\.mod,jene.ogg,' \
+ -e 's,beyond\.s3m,beyond.ogg,' \
+ $PRGNAM.py
+timidity -Ow1sl -id -o- data/jene.mod | oggenc -Q -b 64 -o data/jene.ogg -
+timidity -Ow1sl -id -o- data/beyond.s3m | oggenc -Q -b 64 -o data/beyond.ogg -
+rm -f data/jene.mod data/beyond.s3m
+
mkdir -p $PKG/usr/games $PKG/usr/share/games/$PRGNAM
install -m0755 $PRGNAM.py $PKG/usr/share/games/$PRGNAM
install -m0755 $CWD/$PRGNAM.sh $PKG/usr/games/$PRGNAM
@@ -46,8 +67,10 @@ cp -a data $PKG/usr/share/games/$PRGNAM
# icon made from game data image:
# convert -scale 64x64 data/newship.gif cosmic_assault.png
-mkdir -p $PKG/usr/share/pixmaps
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+# ...and then fixed up with the gimp :(
+mkdir -p $PKG/usr/share/icons/hicolor/64x64/apps $PKG/usr/share/pixmaps
+cat $CWD/$PRGNAM.png > $PKG/usr/share/icons/hicolor/64x64/apps/$PRGNAM.png
+ln -s ../icons/hicolor/64x64/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# .desktop written for this build
mkdir -p $PKG/usr/share/applications