summaryrefslogtreecommitdiffstats
path: root/games/rott/rott.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/rott/rott.SlackBuild')
-rw-r--r--games/rott/rott.SlackBuild39
1 files changed, 25 insertions, 14 deletions
diff --git a/games/rott/rott.SlackBuild b/games/rott/rott.SlackBuild
index 30ce09cd00..65efbe4aa9 100644
--- a/games/rott/rott.SlackBuild
+++ b/games/rott/rott.SlackBuild
@@ -2,15 +2,21 @@
# Slackware build script for rott
-# 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.
+# 20230107 bkw: BUILD=3, fix icon sizes.
+
+# 20211025 bkw: BUILD=2
+# - new-style icons.
+# - .desktop file starts in windowed mode, not fullscreen.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rott
VERSION=${VERSION:-1.1.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -22,9 +28,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 +56,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 +95,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 +108,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