summaryrefslogtreecommitdiffstats
path: root/gis/google-earth/google-earth.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/google-earth/google-earth.SlackBuild')
-rw-r--r--gis/google-earth/google-earth.SlackBuild21
1 files changed, 18 insertions, 3 deletions
diff --git a/gis/google-earth/google-earth.SlackBuild b/gis/google-earth/google-earth.SlackBuild
index d4bac1758a..6ba7015acf 100644
--- a/gis/google-earth/google-earth.SlackBuild
+++ b/gis/google-earth/google-earth.SlackBuild
@@ -24,29 +24,44 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 2013 - A lot of thanks to Willy Sudiarto Raharjo for his input and help
-# with converting the script to work with googles .deb packages.
+# with converting the script to work with google's .deb packages.
# Thanks to rworkman for the additional code and script cleanups
# and to Daniel de Kok and Alan_Hicks for their comments.
PRGNAM=google-earth
VERSION=${VERSION:-7.1.7.2600}
-ARCH=i386 # Since this is the arch google dictates
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i586" ]; then
+ SRCARCH="i386"
+elif [ "$ARCH" = "x86_64" ]; then
+ SRCARCH="amd64"
+else
+ echo "This system is unsupported. Aborting."
+ exit 1
+fi
+
# No flags/configure needed as it is just a binary repackaging.
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
-ar p $CWD/google-earth-stable_current_i386.deb data.tar.xz | tar xJv
+ar p $CWD/google-earth-stable_current_$SRCARCH.deb data.tar.xz | tar xJv
cd $PKG
chown -R root:root .
# Fix Google braindeadness (and mine)