diff options
Diffstat (limited to 'games/lmarbles')
-rw-r--r-- | games/lmarbles/doinst.sh | 6 | ||||
-rw-r--r-- | games/lmarbles/lmarbles.SlackBuild | 50 | ||||
-rw-r--r-- | games/lmarbles/lmarbles.desktop | 7 | ||||
-rw-r--r-- | games/lmarbles/lmarbles.info | 6 | ||||
-rw-r--r-- | games/lmarbles/lmarbles.png | bin | 709 -> 0 bytes |
5 files changed, 51 insertions, 18 deletions
diff --git a/games/lmarbles/doinst.sh b/games/lmarbles/doinst.sh index 5fb28930db..3e5691a052 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 83e3b1cd06..0d9de0c265 100644 --- a/games/lmarbles/lmarbles.SlackBuild +++ b/games/lmarbles/lmarbles.SlackBuild @@ -1,15 +1,23 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for lmarbles -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # 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} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -19,7 +27,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -47,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 @@ -71,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 @@ -89,4 +109,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/games/lmarbles/lmarbles.desktop b/games/lmarbles/lmarbles.desktop new file mode 100644 index 0000000000..a1ea1784a8 --- /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.info b/games/lmarbles/lmarbles.info index bb2d9a2380..f89d417099 100644 --- a/games/lmarbles/lmarbles.info +++ b/games/lmarbles/lmarbles.info @@ -1,10 +1,10 @@ PRGNAM="lmarbles" VERSION="1.0.8" -HOMEPAGE="http://lgames.sourceforge.net/index.php?project=LMarbles" -DOWNLOAD="http://downloads.sourceforge.net/project/lgames/lmarbles/lmarbles-1.0.8.tar.gz" +HOMEPAGE="https://lgames.sourceforge.net/index.php?project=LMarbles" +DOWNLOAD="https://downloads.sourceforge.net/project/lgames/lmarbles/lmarbles-1.0.8.tar.gz" MD5SUM="2735ef0cbf39ac79194321ff49e02f0e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" MAINTAINER="B. Watson" -EMAIL="yalhcru@gmail.com" +EMAIL="urchlay@slackware.uk" diff --git a/games/lmarbles/lmarbles.png b/games/lmarbles/lmarbles.png Binary files differdeleted file mode 100644 index 8c9d029b0b..0000000000 --- a/games/lmarbles/lmarbles.png +++ /dev/null |