From 04cc49c13f6801f91c340c6be5ac62e519c49b1f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 20 Feb 2022 16:01:04 -0500 Subject: games/haxima-nazghul: Fix 15.0 build. Signed-off-by: B. Watson --- games/haxima-nazghul/README | 3 ++ games/haxima-nazghul/haxima-nazghul.SlackBuild | 40 +++++++++++++++++--------- games/haxima-nazghul/haxima-nazghul.desktop | 10 +++++++ 3 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 games/haxima-nazghul/haxima-nazghul.desktop (limited to 'games') diff --git a/games/haxima-nazghul/README b/games/haxima-nazghul/README index 78116259d2..3610f7b919 100644 --- a/games/haxima-nazghul/README +++ b/games/haxima-nazghul/README @@ -1,2 +1,5 @@ Haxima is an Ultima-like game engine (2D tile graphics) with combat, magic, NPC AI, an embedded scripting language, and in-game editing. + +The executable is called "haxima.sh", if you're launching it from the +shell. diff --git a/games/haxima-nazghul/haxima-nazghul.SlackBuild b/games/haxima-nazghul/haxima-nazghul.SlackBuild index d1ac8c62cf..b936cd36a3 100644 --- a/games/haxima-nazghul/haxima-nazghul.SlackBuild +++ b/games/haxima-nazghul/haxima-nazghul.SlackBuild @@ -22,12 +22,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220220 bkw: Modified by SlackBuilds.org, BUILD=2: +# - fix build on 15.0. +# - fix .desktop so it validates and has correct paths. +# - move the nazghul binary to libexec, since it doesn't run on its own. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=haxima-nazghul SRCNAM=$(echo $PRGNAM | cut -c8-14) VERSION=${VERSION:-0.7.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -39,9 +44,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 @@ -76,30 +78,42 @@ cd $SRCNAM-$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 \ + -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 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ DOCS="doc/GHULSCRIPT doc/USERS_GUIDE doc/GAME_RULES doc/MAP_HACKERS_GUIDE \ doc/world_building/*.txt" -sed -i 's/Exec\=haxima/Exec\=haxima.sh/' haxima.desktop + +# 20220220 bkw: source defines its own min() max() distance() macros, +# which conflict with the ones in the modern STL. just renaming them +# works. +sed -i -e 's,\ /dev/null || true +mkdir -p $PKG/usr/games +sed "s,/usr/bin/,/usr/libexec/$PRGNAM/," \ + < $PKG/usr/libexec/$PRGNAM/haxima.sh \ + > $PKG/usr/games/haxima.sh +rm -f $PKG/usr/libexec/$PRGNAM/haxima.sh +chmod 755 $PKG/usr/games/haxima.sh mkdir -p $PKG/usr/share/applications -install -D -m644 haxima.desktop $PKG/usr/share/applications/$PRGNAM.desktop +install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop mkdir -p $PKG/usr/share/pixmaps/ install -D -m644 icons/haxima.png $PKG/usr/share/pixmaps/haxima.png diff --git a/games/haxima-nazghul/haxima-nazghul.desktop b/games/haxima-nazghul/haxima-nazghul.desktop new file mode 100644 index 0000000000..248fbf17d8 --- /dev/null +++ b/games/haxima-nazghul/haxima-nazghul.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Haxima +GenericName=Role Playing Game +Comment=An old school role playing game +Exec=/usr/games/haxima.sh +Icon=/usr/share/pixmaps/haxima.png +Terminal=false +Type=Application +Categories=Game; +Version=1.0 -- cgit v1.2.3-79-gdb01