diff options
Diffstat (limited to 'source/xap/gftp/gftp.SlackBuild')
-rwxr-xr-x | source/xap/gftp/gftp.SlackBuild | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/xap/gftp/gftp.SlackBuild b/source/xap/gftp/gftp.SlackBuild index ba93205e..9a293b64 100755 --- a/source/xap/gftp/gftp.SlackBuild +++ b/source/xap/gftp/gftp.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2012 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,9 +20,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=2.0.19 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-2} +PKGNAM=gftp +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-3} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i486 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi NUMJOBS=${NUMJOBS:-" -j7 "} |