diff options
Diffstat (limited to 'games/zod-engine/zod-engine.SlackBuild')
-rw-r--r-- | games/zod-engine/zod-engine.SlackBuild | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/games/zod-engine/zod-engine.SlackBuild b/games/zod-engine/zod-engine.SlackBuild index d470aa125d..a59c3ed47c 100644 --- a/games/zod-engine/zod-engine.SlackBuild +++ b/games/zod-engine/zod-engine.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for zod-engine -# Copyright 2014-2016 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2014-2023 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,13 +22,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=zod-engine +VERSION=${VERSION:-2011.09.06} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +SRCVER=$(echo $VERSION | tr . -) SRCNAM=zod_linux SRCDIR=$(echo $PRGNAM | tr - _) -SRCVER=${SRCVER:-2011-09-06} -VERSION=$(echo $SRCVER | tr - .) -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -38,7 +42,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -72,6 +83,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Patch to work on -current as well. Thanks to Nazim Joomun. +sed -i 's/#include <dirent.h>/#include <dirent.h>\n#include <ctime>/' zod_src/common.cpp + make -C zod_src/ make -C zod_src/ map_editor make -C zod_launcher_src/ @@ -109,4 +123,4 @@ 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:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |