summaryrefslogtreecommitdiffstats
path: root/source/ap/dmidecode/dmidecode.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/dmidecode/dmidecode.SlackBuild')
-rwxr-xr-xsource/ap/dmidecode/dmidecode.SlackBuild17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/ap/dmidecode/dmidecode.SlackBuild b/source/ap/dmidecode/dmidecode.SlackBuild
index 2a897acee..acd077947 100755
--- a/source/ap/dmidecode/dmidecode.SlackBuild
+++ b/source/ap/dmidecode/dmidecode.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,20 @@
PKGNAM=dmidecode
-VERSION=${VERSION:-2.10}
-ARCH=${ARCH:-x86_64}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:-" -j7 "}
+# 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
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}