summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 407576ca77f76c5fe45328b7c8fd6668ac8f02c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: Det <nimetonmaili g-mail> 
# Check the latest version with:
# $ curl -sL https://dl.google.com/linux/earth/deb/dists/stable/main/binary-amd64/Packages | grep -Pom1 "Version: \K[^-]*"

pkgname=google-earth-pro
pkgver=7.3.2.5495
pkgrel=1
pkgdesc="3D interface to explore the globe, terrain, streets, buildings and other planets - Pro"
arch=('x86_64')
url="https://www.google.com/earth/index.html"
license=('custom:earth')
depends=('glu' 'hicolor-icon-theme' 'ld-lsb>=3-5' 'libsm' 'libxrender' 'nss'
         'libproxy' 'gst-plugins-base-libs' 'libxi' 'fontconfig' 'alsa-lib' 'libcups')
optdepends=('catalyst-utils: For AMD Catalyst'
            'nvidia-utils: For the NVIDIA driver')
provides=('google-earth')
options=('!emptydirs')
install=$pkgname.install
#source=("google-earth-pro-stable_${pkgver}_amd64.deb::https://dl.google.com/earth/client/current/google-earth-pro-stable_current_amd64.deb"
source=("https://dl.google.com/linux/earth/deb/pool/main/g/google-earth-pro-stable/google-earth-pro-stable_$pkgver-r0_amd64.deb"
        'Google-Terms-of-Service.html::https://www.google.com/intl/ALL/policies/terms/index.html'
        'Google-Earth-Additional-Terms-of-Service.html::https://www.google.com/help/terms_maps.html'
        'Legal-Notices-for-Google-Earth-and-Google-Earth-APIs.html::https://www.google.com/help/legalnotices_maps.html'
        'Google-Privacy-Policy.html::https://www.google.com/intl/ALL/policies/privacy/index.html')
md5sums=('d7ba0319862cf2093be0607b131319ae'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP')

_instdir=/opt/google/earth/pro/

package() {
  msg2 "Extracting the data.tar.xz..."
  bsdtar -xf data.tar.xz -C "$pkgdir/"

  msg2 "Moving stuff in place..."
  # The .desktop
  mv "$pkgdir"/$_instdir/google-earth-pro.desktop "$pkgdir"/usr/share/applications/

  # Icons
  for i in 16 22 24 32 48 64 128 256; do
    install -Dm644 "$pkgdir"/$_instdir/product_logo_$i.png \
                   "$pkgdir"/usr/share/icons/hicolor/${i}x${i}/apps/google-earth-pro.png
  done

  # Licenses
  for i in 'Google-Terms-of-Service.html' \
           'Google-Earth-Additional-Terms-of-Service.html' \
           'Legal-Notices-for-Google-Earth-and-Google-Earth-APIs.html' \
           'Google-Privacy-Policy.html'; do
     install -Dm644 $i "$pkgdir"/usr/share/licenses/$pkgname/$i
  done

  msg2 "Removing the Debian-intended cron job and duplicated images..."
  rm -r "$pkgdir"/etc/cron.daily/ "$pkgdir"/$_instdir/product_logo_*.png

  # Fix Search
  msg2 "Attempting fix for search..."
  sed -i '/googleearth-bin/s/^/LC_NUMERIC=en_US.UTF-8 /' "$pkgdir"/$_instdir/googleearth
}