diff options
Diffstat (limited to 'gis/google-earth/google-earth.SlackBuild')
-rw-r--r-- | gis/google-earth/google-earth.SlackBuild | 48 |
1 files changed, 14 insertions, 34 deletions
diff --git a/gis/google-earth/google-earth.SlackBuild b/gis/google-earth/google-earth.SlackBuild index 6d0eb752bd..d1c288e5e5 100644 --- a/gis/google-earth/google-earth.SlackBuild +++ b/gis/google-earth/google-earth.SlackBuild @@ -4,8 +4,8 @@ # Copyright 2007-2013 Michiel van Wessem, Manchester, United Kingdom # Copyright 2016-2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org> +# Copyright 2021 Lenard Spencer, Orlando, Florida, USA # All rights reserved. -# Maintained 2021 by Lenard Spencer <lenardrspencer@gmail.com> # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: @@ -33,7 +33,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=google-earth -VERSION=${VERSION:-7.3.0.3832} +VERSION=${VERSION:-7.3.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -57,25 +57,28 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SRCARCH="i386" -elif [ "$ARCH" = "x86_64" ]; then +if [ "$ARCH" = "x86_64" ]; then SRCARCH="amd64" else - echo "This system is unsupported. Aborting." + echo "This architecture is unsupported. Aborting." exit 1 fi # No flags/configure needed as it is just a binary repackaging. set -e +FULLVERSION=$(ar p google-earth-pro-stable_${VERSION}_${SRCARCH}.deb control.tar.xz 2> /dev/null | tar JxO ./control 2> /dev/null | grep Version | awk '{print $2}' | cut -d- -f1) +if [ -z "$FULLVERSION" ]; then # try to use control.tar.gz instead: + FULLVERSION=$(ar p google-earth-pro-stable_${VERSION}_${SRCARCH}.deb control.tar.gz 2> /dev/null | tar zxO ./control 2> /dev/null | grep Version | awk '{print $2}' | cut -d- -f1) +fi + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT + cd $PKG -ar p $CWD/google-earth-pro-stable_${VERSION}-r0_${SRCARCH}.deb data.tar.xz | tar xJv +ar p $CWD/google-earth-pro-stable_${VERSION}_${SRCARCH}.deb data.tar.xz | tar xJv cd $PKG chown -R root:root . - # Fix Google braindeadness (and mine) find . -type d -exec chmod 0755 {} \; find -L . \ @@ -84,8 +87,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Sadly (by lack of politer word), Google has some inconsistent permissions -# for normal files; this should deal with them rather nicely. +# Sadly (by lack of a more polite word), Google has some inconsistent +# permissions for normal files; this should deal with them rather nicely. find -L . \( -name "*.png" -o -name "*.kml" -o -name "*.xml" \) -exec chmod 0644 {} \; # Install a .desktop launcher: @@ -113,28 +116,5 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Add ld-lsb.so symlink creation to doinst.sh -if [ "$ARCH" = "x86_64" ]; then -cat >> $PKG/install/doinst.sh << "EOF" -# Create ld-lsb symlink -( cd lib64 - if [ ! -e ld-lsb-x86-64.so.3 ]; then - ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 - fi -) - -EOF -else -cat >> $PKG/install/doinst.sh << "EOF" -# Create ld-lsb symlink -( cd lib - if [ ! -e ld-lsb.so.3 ]; then - ln -sf ld-linux.so.2 ld-lsb.so.3 - fi -) - -EOF -fi - cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$FULLVERSION-$ARCH-$BUILD$TAG.$PKGTYPE |