diff options
Diffstat (limited to 'games/openarena/openarena.SlackBuild')
-rw-r--r-- | games/openarena/openarena.SlackBuild | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/games/openarena/openarena.SlackBuild b/games/openarena/openarena.SlackBuild index fbcb35f28e..6dbc75b0ac 100644 --- a/games/openarena/openarena.SlackBuild +++ b/games/openarena/openarena.SlackBuild @@ -2,13 +2,31 @@ # Slackware build script for OpenArena -# Written by Chess Griffin <chess@chessgriffin.com> +# Copyright 2007-2009 Chess Griffin <chess@chessgriffin.com> +# 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. PRGNAM=openarena VERSION=${VERSION:-0.8.1} FINAL_VERSION=${FINAL_VERSION:-0.8.1} # Keep this for future patches ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -21,10 +39,13 @@ $CWD/$PRGNAM.SlackBuild" if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e # Exit on most errors @@ -54,8 +75,10 @@ find . \ -exec chmod 644 {} \; ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) # Uncomment the next line to disable semi-nude models @@ -86,10 +109,13 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh chmod 755 $PKG/usr/share/games/openarena/* mkdir -p $PKG/usr/games -# For x86_64: edit the two included launchers listed below to point to -# the 64 bit binaries in /usr/share/games/openarena instead of i386. -cp $CWD/openarena.launcher $PKG/usr/games/openarena -cp $CWD/oa_ded.launcher $PKG/usr/games/openarena-server +if [ "$ARCH" = "x86_64" ]; then +cp $CWD/openarena.launcher.x86_64 $PKG/usr/games/openarena +cp $CWD/oa_ded.launcher.x86_64 $PKG/usr/games/openarena-server +else +cp $CWD/openarena.launcher.i386 $PKG/usr/games/openarena +cp $CWD/oa_ded.launcher.i386 $PKG/usr/games/openarena-server +fi chmod 755 $PKG/usr/games/openarena* cd $PKG |