From 49b71b0265b39530bd1c66477bc6a2fb6010ddf1 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 15 Oct 2021 14:55:31 -0400 Subject: games/wordwarvi: New-style icons. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- games/wordwarvi/wordwarvi.SlackBuild | 14 ++++++++++---- games/wordwarvi/wordwarvi.desktop | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'games/wordwarvi') diff --git a/games/wordwarvi/wordwarvi.SlackBuild b/games/wordwarvi/wordwarvi.SlackBuild index e6f51b771ba1..5c7949373c56 100644 --- a/games/wordwarvi/wordwarvi.SlackBuild +++ b/games/wordwarvi/wordwarvi.SlackBuild @@ -6,6 +6,7 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211015 bkw: BUILD=2, new-style icons # 20210224 bkw: update for v1.0.4 # 20170302 bkw: use long-format github URL, add .desktop, BUILD=2 @@ -25,9 +26,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 @@ -68,7 +66,15 @@ make install MANDIR=/usr/man DESTDIR=$PKG strip $PKG/usr/games/$PRGNAM mkdir -p $PKG/usr/share/pixmaps $PKG/usr/share/applications -cat icons/${PRGNAM}_icon_128x128.png > $PKG/usr/share/pixmaps/$PRGNAM.png +for i in icons/$PRGNAM*.png; do + px=$( basename $i | sed 's,.*_\([0-9][0-9]*\)x.*,\1,' ) + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + cat $i > $dir/$PRGNAM.png +done + +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/games/wordwarvi/wordwarvi.desktop b/games/wordwarvi/wordwarvi.desktop index 5db69ac69daf..b212402ceef8 100644 --- a/games/wordwarvi/wordwarvi.desktop +++ b/games/wordwarvi/wordwarvi.desktop @@ -2,6 +2,6 @@ Name=Word War VI Type=Application Categories=Game;ArcadeGame; -Exec=wordwarvi %F +Exec=/usr/games/wordwarvi %F TryExec=wordwarvi Icon=wordwarvi -- cgit v1.2.3