aboutsummaryrefslogtreecommitdiff
path: root/games/lmarbles
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-22 04:43:27 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:22 +0700
commit0de0cabbcffe2eecebbf3d07a2ca23935130b881 (patch)
treeb67cdb381bd235e2582b3ec2a8545d7288e1d2bc /games/lmarbles
parentd5849b69b5a07f269bb792d65876ab4270aa36a6 (diff)
games/lmarbles: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/lmarbles')
-rw-r--r--games/lmarbles/doinst.sh6
-rw-r--r--games/lmarbles/lmarbles.SlackBuild38
-rw-r--r--games/lmarbles/lmarbles.desktop7
-rw-r--r--games/lmarbles/lmarbles.pngbin709 -> 0 bytes
4 files changed, 37 insertions, 14 deletions
diff --git a/games/lmarbles/doinst.sh b/games/lmarbles/doinst.sh
index 5fb28930db0b..3e5691a052b5 100644
--- a/games/lmarbles/doinst.sh
+++ b/games/lmarbles/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/lmarbles/lmarbles.SlackBuild b/games/lmarbles/lmarbles.SlackBuild
index 72c27b5b2920..535ff4e8ea11 100644
--- a/games/lmarbles/lmarbles.SlackBuild
+++ b/games/lmarbles/lmarbles.SlackBuild
@@ -6,11 +6,16 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211022 bkw: BUILD=2
+# - new-style icons.
+# - /usr/share/lmarbles => /usr/share/games/lmarbles.
+# - better .desktop file.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lmarbles
VERSION=${VERSION:-1.0.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -22,9 +27,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
@@ -57,11 +59,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# 20211022 bkw: no way to set a variable for this.
+sed -i '/^inst_dir=/s,/lmarbles,/games&,' configure
# man page was locally modified (since it's inaccurate), use our version.
cat $CWD/$PRGNAM.6 > src/$PRGNAM.6
@@ -81,12 +83,20 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-# icon converted from lmarbles48.gif (PNG icons are a bit more standard-ey),
-# update .desktop file to use it.
-rm -rf $PKG/usr/share/icons
+# 20211022 bkw: simpler to replace the desktop file than
+# include all the sed code to edit it here.
+cat $CWD/$PRGNAM.desktop > \
+ $PKG/usr/share/applications/$PRGNAM.desktop
+
+for px in 32 48; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ convert $PRGNAM$px.gif png32:$dir/$PRGNAM.png
+done
+
mkdir -p $PKG/usr/share/pixmaps
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
-sed -i "/^Icon/s,=.*,=$PRGNAM," $PKG/usr/share/applications/$PRGNAM.desktop
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
gzip $PKG/usr/man/man6/$PRGNAM.6
diff --git a/games/lmarbles/lmarbles.desktop b/games/lmarbles/lmarbles.desktop
new file mode 100644
index 000000000000..a1ea1784a8e5
--- /dev/null
+++ b/games/lmarbles/lmarbles.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=LMarbles
+Comment=Atomix-like enhanced puzzle game.
+Exec=/usr/games/lmarbles
+Icon=lmarbles
+Type=Application
+Categories=Game;LogicGame;
diff --git a/games/lmarbles/lmarbles.png b/games/lmarbles/lmarbles.png
deleted file mode 100644
index 8c9d029b0b7e..000000000000
--- a/games/lmarbles/lmarbles.png
+++ /dev/null
Binary files differ