diff options
Diffstat (limited to 'source/installer/busybox.SlackBuild')
-rwxr-xr-x | source/installer/busybox.SlackBuild | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/installer/busybox.SlackBuild b/source/installer/busybox.SlackBuild index a80631e3..4283c4d4 100755 --- a/source/installer/busybox.SlackBuild +++ b/source/installer/busybox.SlackBuild @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2007, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2007, 2009, 2011 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,10 +21,18 @@ PKGNAM=busybox -VERSION=${VERSION:-1.15.3} -ARCH=${ARCH:-x86_64} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-1} +# 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) if [ "$TMP" = "" ]; then @@ -33,7 +41,7 @@ fi cd $TMP rm -rf ${PKGNAM}-${VERSION} -tar xjvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1 +tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1 cd ${PKGNAM}-$VERSION || exit 1 zcat $CWD/busybox.2.6.32.2.diff.gz | patch -p1 || exit 1 |