aboutsummaryrefslogtreecommitdiff
path: root/games/mrrescue
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-22 06:42:15 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:22 +0700
commit77fda57747bf5fbf6c427359a1da8c77f68dae10 (patch)
tree7bc6bdcabd5596c33d0c66df7f961ca4251747f0 /games/mrrescue
parentb1ee6977c2b6ca27020f3fdd6fb6cd7e8c8e661f (diff)
games/mrrescue: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/mrrescue')
-rw-r--r--games/mrrescue/README2
-rw-r--r--games/mrrescue/doinst.sh6
-rw-r--r--games/mrrescue/mrrescue.SlackBuild18
-rw-r--r--games/mrrescue/mrrescue.desktop2
4 files changed, 20 insertions, 8 deletions
diff --git a/games/mrrescue/README b/games/mrrescue/README
index cbfc132263f8..4f109e14519f 100644
--- a/games/mrrescue/README
+++ b/games/mrrescue/README
@@ -1,4 +1,4 @@
-Mr. Rescue (2d platform game)
+mrrescue (2d platform game)
Mr. Rescue is an arcade styled 2d action game centered around evacuating
civilians from burning buildings.
diff --git a/games/mrrescue/doinst.sh b/games/mrrescue/doinst.sh
index 5fb28930db0b..3e5691a052b5 100644
--- a/games/mrrescue/doinst.sh
+++ b/games/mrrescue/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
diff --git a/games/mrrescue/mrrescue.SlackBuild b/games/mrrescue/mrrescue.SlackBuild
index ce259041e522..6e39e2760e2e 100644
--- a/games/mrrescue/mrrescue.SlackBuild
+++ b/games/mrrescue/mrrescue.SlackBuild
@@ -6,6 +6,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211022 bkw: BUILD=2, new-style icons.
# 20200415 bkw: update to latest upstream git, commit a5be73c. Required
# for love-11.x support (someone upgraded love and didn't bother to tell
# me so this has been broken for ~2 year).
@@ -14,7 +15,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mrrescue
VERSION=${VERSION:-1.02e+20180818_a5be73c}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -23,9 +24,6 @@ DIFFVER=${VERSION##*+}
ARCH=noarch
-# 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
@@ -58,10 +56,18 @@ echo '#!/usr/bin/env love' > $PKG/usr/games/$PRGNAM
cat tmp.zip >> $PKG/usr/games/$PRGNAM
chmod 755 $PKG/usr/games/$PRGNAM
-# icon is a piece of data/splash.png from the payload file, chopped up
+# icons made from piece of data/splash.png from the payload file, chopped up
# with the gimp.
+
+for px in 16 32 48 64 128; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ convert -resize $size $CWD/$PRGNAM.png $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
# .desktop written for this build
mkdir -p $PKG/usr/share/applications
diff --git a/games/mrrescue/mrrescue.desktop b/games/mrrescue/mrrescue.desktop
index 694d884bdd26..387a8328dc45 100644
--- a/games/mrrescue/mrrescue.desktop
+++ b/games/mrrescue/mrrescue.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Mr. Rescue
Comment=Rescue civilians from a burning building
-Exec=mrrescue
+Exec=/usr/games/mrrescue
Icon=mrrescue
Terminal=false
Type=Application