summaryrefslogtreecommitdiffstats
path: root/games/pacman-arena/pacman-arena.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/pacman-arena/pacman-arena.SlackBuild')
-rw-r--r--games/pacman-arena/pacman-arena.SlackBuild37
1 files changed, 25 insertions, 12 deletions
diff --git a/games/pacman-arena/pacman-arena.SlackBuild b/games/pacman-arena/pacman-arena.SlackBuild
index e2bb0eb133..f0266e595b 100644
--- a/games/pacman-arena/pacman-arena.SlackBuild
+++ b/games/pacman-arena/pacman-arena.SlackBuild
@@ -2,15 +2,20 @@
# Slackware build script for pacman-arena
-# 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.
+# 20211020 bkw: BUILD=2
+# - fix -current build.
+# - new-style icons.
+# - man page.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pacman-arena
VERSION=${VERSION:-0.15}
-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
@@ -63,14 +65,13 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $SRCNAM
unzip $CWD/$DATAFILE
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 {} \+
autoreconf -if
+SLKCFLAGS+=" -fcommon"
+
# I know we're supposed to use LIBS="-lm", but it doesn't work here.
LDFLAGS="-lm" \
CFLAGS="$SLKCFLAGS" \
@@ -102,14 +103,26 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# icon is a 32x32 chunk of gfx/pacman_arena1.tga edited with gimp.
+# icon made from a screenshot of the game. at 16x16, it just looks like noise.
+for i in $CWD/icons/*.png; do
+ px=$( basename $i | cut -d. -f1 )
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cat $i > $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
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+# man page written for this build
+mkdir -p $PKG/usr/man/man6
+gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh