summaryrefslogtreecommitdiffstats
path: root/games/angband/angband.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/angband/angband.SlackBuild')
-rw-r--r--games/angband/angband.SlackBuild65
1 files changed, 27 insertions, 38 deletions
diff --git a/games/angband/angband.SlackBuild b/games/angband/angband.SlackBuild
index e6dbc5bbd3..1601a24c8b 100644
--- a/games/angband/angband.SlackBuild
+++ b/games/angband/angband.SlackBuild
@@ -2,32 +2,26 @@
# Slackware build script for Angband
-# Copyright 2020 Marshall Scott, SlackBuilds.org Project, David Melik, Spokane,
-# WA, USA.
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Written by Marshall Scott, David Melik, and Ben Collver.
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20220219 bkw: Modified by SlackBuilds.org:
+# - update download URL to one that exists.
+# - actually use SLKCFLAGS.
+# - use full path to icon in .desktop (since it's not in /usr/share/icons).
+# - remove an empty file from the doc dir.
+
+# 20240203
+# - install old_class.txt
+# See also:
+# https://angband.live/forums/forum/angband/vanilla/248199-can-t-get-most-spells-as-ranger
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=angband
-VERSION=${VERSION:-4.2.1}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-4.2.5}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,9 +33,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
@@ -71,20 +62,18 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+tar xvf $CWD/Angband-$VERSION.tar.gz
+cd Angband-$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 {} \+
CFLAGS="$SLKCFLAGS" \
-LDFLAGS="-lSDL" \
-./autogen.sh
./configure \
- --enable-sdl \
+ --enable-sdl2 \
--prefix=/usr \
--datarootdir=/usr/share/games \
--sysconfdir=/etc \
@@ -95,11 +84,10 @@ LDFLAGS="-lSDL" \
make
make install DESTDIR=$PKG
+strip $PKG/usr/games/$PRGNAM
+cp lib/gamedata/old_class.txt $PKG/etc/angband/gamedata/
-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
-
-find $PKG -name "delete.me" -exec rm -f {} \;
+find $PKG -name "delete.me" -exec rm -f {} \+
mkdir -p $PKG/var/games/angband/archive
mkdir -p $PKG/var/games/angband/save
@@ -113,9 +101,10 @@ cp $CWD/angband.desktop $PKG/usr/share/applications
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a changes.txt README.md docs/ lib/help/ \
$PKG/usr/doc/$PRGNAM-$VERSION
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+cp $CWD/README $PKG/usr/doc/$PRGNAM-$VERSION
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \+
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-rm -f $PKG/usr/doc/$PRGNAM-$VERSION/help/.dep*
+rm -f $PKG/usr/doc/$PRGNAM-$VERSION/{doc,help}/.dep*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc