summaryrefslogtreecommitdiffstats
path: root/games/wordwarvi
diff options
context:
space:
mode:
author B. Watson2021-10-15 20:55:31 +0200
committer Willy Sudiarto Raharjo2021-10-29 12:07:14 +0200
commit49b71b0265b39530bd1c66477bc6a2fb6010ddf1 (patch)
tree3dbfa769c542e09a32c9adc5d5a248e459a832bb /games/wordwarvi
parentb64588a8ffa48abfb2e6bc8000e577dd7eaf531d (diff)
downloadslackbuilds-49b71b0265b39530bd1c66477bc6a2fb6010ddf1.tar.gz
games/wordwarvi: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/wordwarvi')
-rw-r--r--games/wordwarvi/wordwarvi.SlackBuild14
-rw-r--r--games/wordwarvi/wordwarvi.desktop2
2 files changed, 11 insertions, 5 deletions
diff --git a/games/wordwarvi/wordwarvi.SlackBuild b/games/wordwarvi/wordwarvi.SlackBuild
index e6f51b771b..5c7949373c 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 5db69ac69d..b212402cee 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