From b4b932fa74598f3e4aa9bf7cdebc871ed537751c Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 2 Nov 2021 04:22:15 -0400 Subject: [PATCH] games/hack-of-life: Icon and .desktop. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- games/hack-of-life/hack-of-life.SlackBuild | 21 +++++++++++++++++---- games/hack-of-life/hack-of-life.desktop | 8 ++++++++ games/hack-of-life/hack-of-life.png | Bin 0 -> 938 bytes 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 games/hack-of-life/hack-of-life.desktop create mode 100644 games/hack-of-life/hack-of-life.png diff --git a/games/hack-of-life/hack-of-life.SlackBuild b/games/hack-of-life/hack-of-life.SlackBuild index b81f718388..e358c00cad 100644 --- a/games/hack-of-life/hack-of-life.SlackBuild +++ b/games/hack-of-life/hack-of-life.SlackBuild @@ -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 diff --git a/games/hack-of-life/hack-of-life.desktop b/games/hack-of-life/hack-of-life.desktop new file mode 100644 index 0000000000..b74de7162b --- /dev/null +++ b/games/hack-of-life/hack-of-life.desktop @@ -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; diff --git a/games/hack-of-life/hack-of-life.png b/games/hack-of-life/hack-of-life.png new file mode 100644 index 0000000000000000000000000000000000000000..f89e6fbd4b4052ac31310516fa904b1cdb501c89 GIT binary patch literal 938 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7Ro>U~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5j~)%+dJZrHe$_tvfnWR``h>(U;lE<+?&3t2Ip4NAIt|EE5$?y}qXGg9rPM zu4?YyypC^OlfnxKPuZ?QeE zeZ--CO6#NL#|}?%mAWUp9(|O4-gKJje9w%RS7ZuXB6PNFxO8YuM%EGGBY~lpHRDfI ztSP$pXw6iuHHH5F4i)&t$33z-%c!!U!PP@x;esaKDGADMtNprKMcy8-{quKSywY^1 zb-V^eXBPADZhFoBzxn>%sGlDV^)+SKZ^g?zPv+ow%k*{C;~IHuzrQRTcFf^bm*dwl zUY@@se0J0qju$uC^w!OuwTV6E9Yd{uTh6Ipc@V)n>ep}Qs zT)GnaiOs@-rHy;a-e;fR^h5F$UYyr>qB?wt#)hZQ(`dMbF1V+