summaryrefslogtreecommitdiffstats
path: root/games/hack-of-life/hack-of-life.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/hack-of-life/hack-of-life.SlackBuild')
-rw-r--r--games/hack-of-life/hack-of-life.SlackBuild25
1 files changed, 20 insertions, 5 deletions
diff --git a/games/hack-of-life/hack-of-life.SlackBuild b/games/hack-of-life/hack-of-life.SlackBuild
index b81f718388..b92dbde447 100644
--- a/games/hack-of-life/hack-of-life.SlackBuild
+++ b/games/hack-of-life/hack-of-life.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for hack-of-life
-# 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.
@@ -12,11 +12,14 @@
# standard in the roguelike world... It's not configurable in this
# game, meaning I'm never going to enjoy playing it very much :(
+# 20230107 bkw: BUILD=3, add doinst.sh.
+# 20211102 bkw: BUILD=2, icon and .desktop.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=hack-of-life
VERSION=${VERSION:-20130628_3a6c824}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -28,9 +31,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
@@ -91,10 +91,25 @@ gzip -9c < $CWD/hackoflife.6 > $PKG/usr/man/man6/hackoflife.6.gz
# chose to name the package and executable 2 different names...
ln -s hackoflife.6.gz $PKG/usr/man/man6/$PRGNAM.6.gz
+# icon and .desktop by SlackBuild author.
+mkdir -p $PKG/usr/share/applications
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+for px in 16 32 48 64; 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
+
+mkdir -p $PKG/usr/share/pixmaps
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
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