aboutsummaryrefslogtreecommitdiff
path: root/libraries/pygame/pygame.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/pygame/pygame.SlackBuild')
-rw-r--r--libraries/pygame/pygame.SlackBuild18
1 files changed, 8 insertions, 10 deletions
diff --git a/libraries/pygame/pygame.SlackBuild b/libraries/pygame/pygame.SlackBuild
index 1da5a331bc592..82c1a6a1a2535 100644
--- a/libraries/pygame/pygame.SlackBuild
+++ b/libraries/pygame/pygame.SlackBuild
@@ -1,24 +1,21 @@
#!/bin/sh
## Written by hollywoodb (hollywoodb@fastmail.fm)
-
-# Verify script is being run by root user.
-if [ "$(id -u)" != "0" ]; then
- echo "This script must be run as root!"
- exit
-fi
+# Modified by the SlackBuilds.org project
NAME=pygame
VERSION=1.7.1
-SRCVERSION=${VERSION}release
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-CWD=`pwd`
+
+CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$NAME
OUTPUT=${OUTPUT:-/tmp}
+SRCVERSION=${VERSION}release
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
@@ -28,6 +25,7 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
+rm -rf $NAME-$SRCVERSION
tar -xzvf $CWD/$NAME-$SRCVERSION.tar.gz || exit 1
cd $NAME-$SRCVERSION || exit 1
chown -R root:root .
@@ -52,7 +50,7 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
# Let's extract the installable tarball now into $PKG
# Since we're in the right place, strip everything and build the package
cd $PKG
-tar -xzf $TMP/$NAME-$SRCVERSION/dist/$NAME-$SRCVERSION.linux-i686.tar.gz || exit 1
+tar xzf $TMP/$NAME-$SRCVERSION/dist/$NAME-$SRCVERSION.linux-i686.tar.gz || exit 1
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null