games/hnefatafl: Updated for version 140617.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Alexander Söderlund 2014-06-17 17:48:01 +07:00 committed by Erik Hanson
parent e1c68e407e
commit 139dc4299b
5 changed files with 49 additions and 61 deletions

View file

@ -1,16 +1,8 @@
Hnefatafl is the Norse board game. It has been played in Scandinavia
since at least 400 AD.
Hnefatafl is a Norse board game that has been played in Scandinavia
since at least 400 A.D..
Hnefatafl (with any board setup) and tablut are fully supported using
rulesets. Other regional variants are partly supported.
This is an implementation written in C. The game rules are defined with
ruleset files and are therefore somewhat flexible. There is a computer
player and an X interface, but both are optional. Network play is not
supported.
The program has CLI and XLib interfaces. You can play hotseat or versus
a computer player, but network play is not supported.
To compile the program without XLib, invoke the script with
LINK_XLIB=no in the environment, e.g.
LINK_XLIB=no ./hnefatafl.SlackBuild
Nearly all settings are compile-time options that can be changed in
`config.mk`, including language and the amount of memory that the
computer player may use for hashing.

View file

@ -1,15 +1,24 @@
#!/bin/sh
# Slackware 14.0 build script for HNEFATAFL
# Slackware 14.1 build script for Hnefatafl
# Copyright 2013 Alexander Söderlund, Sweden. Revised 2013-09-20.
# Copyright © 2013-2014 Alexander Söderlund, Sweden
#
# Script license: CC0, see:
# http://creativecommons.org/publicdomain/zero/1.0/
# http://creativecommons.org/publicdomain/zero/1.0/legalcode
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
PRGNAM=hnefatafl
VERSION=${VERSION:-130920}
VERSION=${VERSION:-140617}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -46,39 +55,34 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM$VERSION
tar xvf $CWD/$PRGNAM$VERSION.tar.bz2
tar -xjf $CWD/$PRGNAM$VERSION.tar.bz2
cd $PRGNAM$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 \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-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 {} \;
if [ ! "${LINK_XLIB:-YES}" = "YES" ]; then
patch -p1 config.mk $CWD/no-link-xlib.diff
fi
# See config.mk for available LANGUAGE ISO 639-2 codes.
# c99 is for restrict pointers; NDEBUG is to compile without asserts.
make \
CFLAGS_OPT="$SLKCFLAGS" \
LANGUAGE="${LANGUAGE:-eng}" \
PREFIX="/usr" \
PREFIX_X11_LIB="/usr/lib${LIBDIRSUFFIX}"
CC=gcc \
CFLAGS="-std=c99 -DNDEBUG $SLKCFLAGS"
make install \
LANGUAGE="${LANGUAGE:-eng}" \
PREFIX="${PKG}/usr" \
PREFIX_DATA_RULES_CONF="/usr/share/games/${PRGNAM}/rules"
DESTDIR="$PKG" \
PREFIX=/usr
# The default language is Swedish. Change it to English:
sed -i 's/^l swe$/l eng/' $PKG/usr/share/games/hnefatafl/hnefataflrc
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# "make install" processes, installs, and compresses the man page. Don't
# attempt to do it manually since we'd miss out on the processing part.
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGES gpl.txt fdl.txt $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGES CONTRIBUTING INSTALL LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install

View file

@ -1,10 +1,10 @@
PRGNAM="hnefatafl"
VERSION="130920"
HOMEPAGE="http://www.oktv.se/hemsida/alexander.soderlund/prog/c/hnefatafl/hnefatafl.html"
DOWNLOAD="http://www.oktv.se/hemsida/alexander.soderlund/prog/c/hnefatafl/src/hnefatafl130920.tar.bz2"
MD5SUM="c4ab56ca75ee66a913d25ad4b71128a2"
VERSION="140617"
HOMEPAGE="http://hnefatafl.se"
DOWNLOAD="http://hnefatafl.se/src/hnefatafl140617.tar.bz2"
MD5SUM="f32ab441af9edbfb22d9e3f532b13f3c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Alexander Söderlund"
EMAIL="alexander.soderlund@oktv.se"
EMAIL="soderlund@tafl.se"

View file

@ -1,8 +0,0 @@
96c96
< MACRO_UI_XLIB= -DHT_UI_XLIB
---
> #MACRO_UI_XLIB= -DHT_UI_XLIB
122c122
< LIB_XLIB= -L$(PREFIX_X11_LIB) -lX11 -lXpm
---
> #LIB_XLIB= -L$(PREFIX_X11_LIB) -lX11 -lXpm

View file

@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
hnefatafl: hnefatafl (Norse board game)
hnefatafl: Hnefatafl (Norse board game)
hnefatafl:
hnefatafl: Hnefatafl has been played in Scandinavia since at least 400 AD.
hnefatafl: Hnefatafl (with any board setup) and tablut are fully supported
hnefatafl: using rulesets. Other regional variants are partly supported.
hnefatafl:
hnefatafl: The program has CLI and XLib interfaces. You can play hotseat or
hnefatafl: versus a computer player, but network play is not supported.
hnefatafl: Hnefatafl is a Norse board game that has been played in Scandinavia
hnefatafl: since at least 400 A.D..
hnefatafl:
hnefatafl: This is an implementation written in C. The game rules are defined
hnefatafl: with ruleset files and are therefore somewhat flexible. There is a
hnefatafl: computer player and an X interface, but both are optional. Network
hnefatafl: play is not supported.
hnefatafl:
hnefatafl: