aboutsummaryrefslogtreecommitdiff
path: root/games/hnefatafl
diff options
context:
space:
mode:
authorAlexander Söderlund <alexander.soderlund@oktv.se>2014-06-17 17:48:01 +0700
committerErik Hanson <erik@slackbuilds.org>2014-06-18 16:19:03 -0500
commit139dc4299b9915812b9abd6e0bd919051b4dd512 (patch)
treee92f80f0990ba1cb6bf51b84df3ef1ec645eeaa6 /games/hnefatafl
parente1c68e407e489d330130373a58160ee39cfe500f (diff)
games/hnefatafl: Updated for version 140617.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/hnefatafl')
-rw-r--r--games/hnefatafl/README20
-rw-r--r--games/hnefatafl/hnefatafl.SlackBuild58
-rw-r--r--games/hnefatafl/hnefatafl.info10
-rw-r--r--games/hnefatafl/no-link-xlib.diff8
-rw-r--r--games/hnefatafl/slack-desc14
5 files changed, 49 insertions, 61 deletions
diff --git a/games/hnefatafl/README b/games/hnefatafl/README
index b1c9b2c00bc15..fabd2b5aca2cc 100644
--- a/games/hnefatafl/README
+++ b/games/hnefatafl/README
@@ -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.
diff --git a/games/hnefatafl/hnefatafl.SlackBuild b/games/hnefatafl/hnefatafl.SlackBuild
index 02823f8f65e8b..c1290d339bff3 100644
--- a/games/hnefatafl/hnefatafl.SlackBuild
+++ b/games/hnefatafl/hnefatafl.SlackBuild
@@ -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 {} \;
-
-if [ ! "${LINK_XLIB:-YES}" = "YES" ]; then
- patch -p1 config.mk $CWD/no-link-xlib.diff
-fi
+ \( -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 {} \;
-# 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
diff --git a/games/hnefatafl/hnefatafl.info b/games/hnefatafl/hnefatafl.info
index 9dcb8c487a8fe..5db0775adf2ce 100644
--- a/games/hnefatafl/hnefatafl.info
+++ b/games/hnefatafl/hnefatafl.info
@@ -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"
diff --git a/games/hnefatafl/no-link-xlib.diff b/games/hnefatafl/no-link-xlib.diff
deleted file mode 100644
index 74adc927327ab..0000000000000
--- a/games/hnefatafl/no-link-xlib.diff
+++ /dev/null
@@ -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
diff --git a/games/hnefatafl/slack-desc b/games/hnefatafl/slack-desc
index 7d107ffa97172..6c78f428a19d3 100644
--- a/games/hnefatafl/slack-desc
+++ b/games/hnefatafl/slack-desc
@@ -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: