aboutsummaryrefslogtreecommitdiff
path: root/games/rott/rott.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-25 19:18:39 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:24 +0700
commit5302c35e63561403585dbacfcd68c69bfe40c840 (patch)
tree00a0d181611525912fe9f304bf8e5a4162ca19da /games/rott/rott.SlackBuild
parent8ca966109ccf2020a3d06f2bd1f1feed7b799a85 (diff)
games/rott: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/rott/rott.SlackBuild')
-rw-r--r--games/rott/rott.SlackBuild33
1 files changed, 21 insertions, 12 deletions
diff --git a/games/rott/rott.SlackBuild b/games/rott/rott.SlackBuild
index 30ce09cd0064b..030515a094e7c 100644
--- a/games/rott/rott.SlackBuild
+++ b/games/rott/rott.SlackBuild
@@ -6,6 +6,10 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211025 bkw: BUILD=2
+# - new-style icons.
+# - .desktop file starts in windowed mode, not fullscreen.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rott
@@ -22,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
@@ -53,12 +54,8 @@ cd $TMP
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 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 {} \+
patch -p1 < $CWD/manpage.diff
@@ -96,7 +93,7 @@ ln -s $PRGNAM.6.gz $MANDIR/$PRGNAM-demo.6.gz
ln -s $PRGNAM.6.gz $MANDIR/$PRGNAM-reg.6.gz
ln -s $PRGNAM.6.gz $MANDIR/$PRGNAM-cdrom.6.gz
-# Optional shareware game data
+# Shareware game data. Used to be optional, always included now.
mkdir -p $PKG/usr/share/games/$PRGNAM
if [ -e $CWD/1rott13.zip ]; then
unzip $CWD/1rott13.zip ROTTSW13.SHR
@@ -109,8 +106,20 @@ fi
install -m0755 -oroot -groot $CWD/$PRGNAM.sh $PKG/usr/games/$PRGNAM
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
-cp misc/$PRGNAM.desktop $PKG/usr/share/applications
-cp misc/$PRGNAM.xpm $PKG/usr/share/pixmaps
+sed -e 's,Exec=,&/usr/games/,' \
+ -e 's,-window,,' \
+ < misc/$PRGNAM.desktop \
+ > $PKG/usr/share/applications/$PRGNAM.desktop
+
+# Icon made for this SlackBuild.
+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
+
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp COPYING README doc/*.txt $PKG/usr/doc/$PRGNAM-$VERSION