diff options
Diffstat (limited to 'games/angband/angband.SlackBuild')
-rw-r--r-- | games/angband/angband.SlackBuild | 77 |
1 files changed, 38 insertions, 39 deletions
diff --git a/games/angband/angband.SlackBuild b/games/angband/angband.SlackBuild index 886f7f7e0f..1601a24c8b 100644 --- a/games/angband/angband.SlackBuild +++ b/games/angband/angband.SlackBuild @@ -1,32 +1,29 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Angband -# Copyright 2013 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.0} -BUILD=${BUILD:-1} +VERSION=${VERSION:-4.2.5} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,7 +33,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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} @@ -61,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 \ @@ -85,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 @@ -101,15 +99,16 @@ cp $CWD/angband.png $PKG/usr/share/pixmaps cp $CWD/angband.desktop $PKG/usr/share/applications mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a changes.txt readme.txt lib/help/ \ +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 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 |