summaryrefslogtreecommitdiff
path: root/games/an/an.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/an/an.SlackBuild')
-rw-r--r--games/an/an.SlackBuild28
1 files changed, 13 insertions, 15 deletions
diff --git a/games/an/an.SlackBuild b/games/an/an.SlackBuild
index dfb1853f2c..71f6d9f5fc 100644
--- a/games/an/an.SlackBuild
+++ b/games/an/an.SlackBuild
@@ -6,14 +6,19 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20160804 bkw: Updated to 1.2. Apparently 1.2 is a release by the
+# maintainer(s) of the Debian an package, not the original author...
+# but the old 0.95 was segfaulting when built with gcc5. Also, the
+# new version has Unicode support.
+
PRGNAM=an
-VERSION=${VERSION:-0.95_2}
+VERSION=${VERSION:-1.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -24,8 +29,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -51,7 +56,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG/usr/{games,man/man6} $OUTPUT
cd $TMP
rm -rf ${PRGNAM}-${SRCVER}
-tar xvf $CWD/${PRGNAM}_$TARVER.tar.gz
+tar xvf $CWD/${PRGNAM}_$TARVER.orig.tar.xz
cd ${PRGNAM}-$SRCVER
chown -R root:root .
find -L . \
@@ -60,12 +65,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Slackware's dictionary is in /usr/share/dict/words (not /usr/dict/words).
-# an's default dictionary is also /usr/share/dict/words, but the README and
-# man page incorrectly state /usr/dict/words.
-patch -p1 < $CWD/usr_share_dict_words_docs.diff
-
-make MANDIR=/usr/man/man6 DEFS="$SLKCFLAGS"
+make MANDIR=/usr/man/man6 CC="gcc $SLKCFLAGS"
make install DESTDIR=$PKG MANDIR=$PKG/usr/man/man6
strip $PKG/usr/games/$PRGNAM
@@ -73,9 +73,7 @@ gzip -9 $PKG/usr/man/man6/$PRGNAM.6
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp \
- COPY* DICTIONARY EXAMPLE.ANAGRAMS HINTS README TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp ALGORITHM COPYING $PKG/usr/doc/$PRGNAM-$VERSION
chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/*
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -92,7 +90,7 @@ if [ -e $CWD/$GUI_IN ]; then
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
cp $CWD/$GUI_OUT.desktop $PKG/usr/share/applications
-# TODO: Anyone want to design a real icon? IANAGD...
+ # TODO: Anyone want to design a real icon? IANAGD...
cp $CWD/$GUI_OUT.png $PKG/usr/share/pixmaps
cat $CWD/doinst.sh > $PKG/install/doinst.sh