diff options
Diffstat (limited to 'gis/google-earth/google-earth.SlackBuild')
-rw-r--r-- | gis/google-earth/google-earth.SlackBuild | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/gis/google-earth/google-earth.SlackBuild b/gis/google-earth/google-earth.SlackBuild index c6c6b03fe4..65011400a6 100644 --- a/gis/google-earth/google-earth.SlackBuild +++ b/gis/google-earth/google-earth.SlackBuild @@ -1,9 +1,10 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for google-earth # Copyright 2007-2013 Michiel van Wessem, Manchester, United Kingdom -# Copyright 2016-2019 Willy Sudiarto Raharjo <willysr@slackbuilds.org> +# Copyright 2016-2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org> +# Copyright 2021-2022 Lenard Spencer, Orlando, Florida, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -29,10 +30,14 @@ # Thanks to rworkman for the additional code and script cleanups # and to Daniel de Kok and Alan_Hicks for their comments. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=google-earth -VERSION=${VERSION:-7.3.3.7786} +VERSION=${VERSION:-7.3.6.9796} +SHORTVER=${SHORTVER:-7.3.6} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -41,17 +46,22 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + 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 @@ -60,8 +70,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT + cd $PKG -ar p $CWD/google-earth-stable_current_${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) @@ -72,16 +83,19 @@ 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: 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 @@ -102,4 +116,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |