summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/supertux/slack-desc14
-rw-r--r--games/supertux/supertux.SlackBuild27
2 files changed, 30 insertions, 11 deletions
diff --git a/games/supertux/slack-desc b/games/supertux/slack-desc
index 248f571ab4..b99eb73906 100644
--- a/games/supertux/slack-desc
+++ b/games/supertux/slack-desc
@@ -1,10 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
supertux: SuperTux (classic 2D jump'n run sidescroller game)
-supertux:
+supertux:
supertux: SuperTux is a classic 2D jump'n run sidescroller game in a style
supertux: similar to the original SuperMario games.
-supertux:
+supertux:
supertux: Homepage: http://supertux.berlios.de/
-supertux:
+supertux:
supertux:
supertux:
supertux:
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