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.SlackBuild17
1 files changed, 8 insertions, 9 deletions
diff --git a/gis/google-earth/google-earth.SlackBuild b/gis/google-earth/google-earth.SlackBuild
index 82bc06cb7a..65011400a6 100644
--- a/gis/google-earth/google-earth.SlackBuild
+++ b/gis/google-earth/google-earth.SlackBuild
@@ -4,7 +4,7 @@
# 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
+# Copyright 2021-2022 Lenard Spencer, Orlando, Florida, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -33,7 +33,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=google-earth
-VERSION=${VERSION:-7.3.4}
+VERSION=${VERSION:-7.3.6.9796}
+SHORTVER=${SHORTVER:-7.3.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -67,16 +68,11 @@ 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}_${SRCARCH}.deb data.tar.xz | tar xJv
+ar p $CWD/google-earth-pro-stable_${SHORTVER}_${SRCARCH}.deb data.tar.xz | tar xJv
cd $PKG
chown -R root:root .
# Fix Google braindeadness (and mine)
@@ -93,10 +89,13 @@ find -L . \( -name "*.png" -o -name "*.kml" -o -name "*.xml" \) -exec chmod 0644
# Install a .desktop launcher:
mv $PKG/opt/google/earth/pro/google-earth-pro.desktop $PKG/usr/share/applications/google-earth.desktop
+# Clean up .desktop to satisfy sbopkglint:
+sed -i '/MultipleArgs/d' $PKG/usr/share/applications/google-earth.desktop
+sed -i "s|Application;||" $PKG/usr/share/applications/google-earth.desktop
# Copy icons to /usr/share/icons
for icon in 16 22 24 32 48 64 128 256; do
- install -D $PKG/opt/google/earth/pro/product_logo_${icon}.png \
+ install -m 644 -D $PKG/opt/google/earth/pro/product_logo_${icon}.png \
$PKG/usr/share/icons/hicolor/${icon}x${icon}/apps/${PRGNAM}-pro.png
done