games/hack-of-life: Icon and .desktop.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2021-11-02 04:22:15 -04:00 committed by Willy Sudiarto Raharjo
parent bf998447e6
commit b4b932fa74
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 25 additions and 4 deletions

View file

@ -12,11 +12,13 @@
# standard in the roguelike world... It's not configurable in this
# game, meaning I'm never going to enjoy playing it very much :(
# 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:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -28,9 +30,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,6 +90,20 @@ 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

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=Hack Of Life
Comment=Multiplayer Conway's Life Variant
Exec=/usr/games/hack-of-life
Icon=hack-of-life
Terminal=true
Type=Application
Categories=Game;StrategyGame;

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B