diff options
Diffstat (limited to 'games/supertux/supertux.SlackBuild')
-rw-r--r-- | games/supertux/supertux.SlackBuild | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/games/supertux/supertux.SlackBuild b/games/supertux/supertux.SlackBuild index e10fc0625b..2d684bc7f4 100644 --- a/games/supertux/supertux.SlackBuild +++ b/games/supertux/supertux.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for supertux -# Copyright 2006,2008 Robby Workman, Northport, Alabama, USA +# Copyright 2006,2008,2010 Robby Workman, Northport, Alabama, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,10 +24,19 @@ PRGNAM=supertux VERSION=0.1.3 -ARCH=${ARCH:-i486} BUILD=${BUILD:-1} 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 @@ -37,8 +46,10 @@ if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - elif [ "$ARCH" = "x86_64" ]; then +elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" fi set -e @@ -67,11 +78,6 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog INSTALL LEVELDESIGN \ - NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION/ -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null @@ -79,6 +85,11 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ sed -i s%'Icon=supertux.png'%'Icon=supertux'%g \ $PKG/usr/share/applications/supertux.desktop +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog INSTALL LEVELDESIGN \ + NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION/ +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |