summaryrefslogtreecommitdiff
path: root/games/openarena/openarena.SlackBuild
diff options
context:
space:
mode:
authorChess Griffin <chess@chessgriffin.com>2010-05-18 14:02:27 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-05-18 14:02:27 -0500
commit6de99e52d075f17a44a7f85c94c9be73deca0ec0 (patch)
treeeeacc2dfb802bba4fe856c55336f46a863f5a0a2 /games/openarena/openarena.SlackBuild
parente05825ae589f757af458a9ffd288f56b62f55edb (diff)
downloadslackbuilds-6de99e52d075f17a44a7f85c94c9be73deca0ec0.tar.gz
games/openarena: Miscellaneous script cleanups.
Diffstat (limited to 'games/openarena/openarena.SlackBuild')
-rw-r--r--games/openarena/openarena.SlackBuild42
1 files changed, 25 insertions, 17 deletions
diff --git a/games/openarena/openarena.SlackBuild b/games/openarena/openarena.SlackBuild
index 29a63ae8e5..fc9b47b261 100644
--- a/games/openarena/openarena.SlackBuild
+++ b/games/openarena/openarena.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for OpenArena
-# Copyright 2007-2009 Chess Griffin <chess@chessgriffin.com>
+# Copyright 2007-2010 Chess Griffin <chess@chessgriffin.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,12 +23,21 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=openarena
-VERSION=${VERSION:-0.8.1}
-FINAL_VERSION=${FINAL_VERSION:-0.8.5} # Keep this for future patches
-ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.8.5}
+SRC_VERSION=${SRC_VERSION:-0.8.1} # Keep this for future patches
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -46,6 +55,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e # Exit on most errors
@@ -62,11 +74,11 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf $PRGNAM-$SRC_VERSION
unzip -o $CWD/oa081.zip
# Keep the following for any future patches
unzip -o $CWD/oa085p.zip
-cd $PRGNAM-$VERSION
+cd $PRGNAM-$SRC_VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -74,12 +86,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-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 || true
-)
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Uncomment the next line to disable semi-nude models
#rm -f baseoa/pak2-players-mature.pk3
@@ -92,9 +100,9 @@ install -D -m 0644 $CWD/openarena.desktop \
mkdir -p $PKG/usr/share/pixmaps
cp $CWD/*.png $PKG/usr/share/pixmaps
-mkdir -p $PKG/usr/doc/$PRGNAM-$FINAL_VERSION
-cp $DOCS $PKG/usr/doc/$PRGNAM-$FINAL_VERSION
-find $PKG/usr/doc/$PRGNAM-$FINAL_VERSION -type f -exec chmod 0644 {} \;
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \;
mkdir -p $PKG/usr/share/games/openarena/{baseoa,missionpack}
cp -rf {baseoa,missionpack}/ $PKG/usr/share/games/openarena/
@@ -121,4 +129,4 @@ fi
chmod 755 $PKG/usr/games/openarena*
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$FINAL_VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}