diff options
author | B. Watson <yalhcru@gmail.com> | 2021-12-28 15:36:10 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-01-04 07:55:38 +0700 |
commit | 0e2d8adf7df55b4f99bc816be6516639b5402d91 (patch) | |
tree | aaaeae8cf2fbb029230043ca2b988750980427ef /games/cosmic_assault | |
parent | 21a28ca3db27f3d69e5c120009193b212b22c7a5 (diff) |
games/cosmic_assault: Fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/cosmic_assault')
-rw-r--r-- | games/cosmic_assault/cosmic_assault.SlackBuild | 27 | ||||
-rw-r--r-- | games/cosmic_assault/doinst.sh | 6 |
2 files changed, 30 insertions, 3 deletions
diff --git a/games/cosmic_assault/cosmic_assault.SlackBuild b/games/cosmic_assault/cosmic_assault.SlackBuild index a6782f51ce17..de2e209fc6c2 100644 --- a/games/cosmic_assault/cosmic_assault.SlackBuild +++ b/games/cosmic_assault/cosmic_assault.SlackBuild @@ -6,11 +6,17 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 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 +45,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 +66,9 @@ 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 +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 diff --git a/games/cosmic_assault/doinst.sh b/games/cosmic_assault/doinst.sh index 5fb28930db0b..3e5691a052b5 100644 --- a/games/cosmic_assault/doinst.sh +++ b/games/cosmic_assault/doinst.sh @@ -1,3 +1,9 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi |