updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / bin32-google-earth / PKGBUILD
blob2feebc1d6a27f04cecb2ca6be61f5ae062339340
1 # Maintainer: Jesus Lazaro Plaza <jesuslazaro84 at gmail dot com>
2 # Based on Penguin's one: 'google-earth' (i686 only)
5 _use_arch_libs="no" # Change to "yes" if you want to use provided-by-Arch libraries instead of provided-by-Google ones.
7 pkgname=bin32-google-earth
8 _pkgname=google-earth
9 pkgver=6.0.3.2197
10 pkgrel=1
11 pkgdesc="32 bits binaries of google-earth for Arch64"
12 url="http://earth.google.com"
13 license=('custom')
14 depends=('lib32-libsm' 'lib32-libxrandr' 'lib32-libgl' 'lib32-glib2' 'lib32-libxi' 'lib32-pcre' 'lib32-fontconfig' 'lib32-libxdamage' 'lib32-qt' 'lib32-mesa' 'lib32-curl' 'lib32-sqlite3' 'ld-lsb')
15 optdepends=('ttf-bitstream-vera: Fonts'
16             'lib32-nss-mdns: In case the application fails to contact the servers'
17             'lib32-libgtk2: SCIM support'
18             'lib32-nvidia-utils: For using Google Earth with nvidia graphics driver'
19             'lib32-catalyst-utils: For using Google Earth with Ati catalyst graphics driver'
20             'lib32-intel-dri: For using Google Earth with intel graphics driver'
21             'lib32-ati-dri: For using Gogle Earth with ati graphics driver')
22 conflicts=('google-earth')
23 install=google-earth.install
24 source=(http://dl.google.com/earth/client/current/GoogleEarthLinux.bin
25         http://earth.google.com/intl/en/license.html
26         googleearth
27         googleearth.desktop
28         googleearth-mimetypes.xml
29         qt.conf
30         pangorc)
31 arch=('x86_64')
32 md5sums=('6808153226b99f21a66f5f615fcf7051'
33          '757d9726191f365209fa13acdd0ab6e7'
34          '4dee705ee4221051e0fefd4df01b4581'
35          'be7209d3edb3df110946acf5e0cd0db3'
36          '84e1efd656f86c52333cc629b31accb0'
37          '335088571a7182988280643c61e0230e'
38          'bd9f74c28489eb79f31e84977e3cf305')
39 _libs_to_remove="libcurl.so.4 libGLU.so.1 libQtCore.so.4 libQtGui.so.4 libQtNetwork.so.4 libQtWebKit.so.4"
40 [ "${_use_arch_libs}" == "no" ] && depends=('lib32-libsm' 'lib32-libxrandr' 'lib32-libgl' 'lib32-glib2' 'lib32-libxi' 'lib32-pcre' 'lib32-fontconfig' 'lib32-libxdamage' 'ld-lsb')
42 build() {
43         cd ${srcdir}
45         # Extract archive
46         sh ./GoogleEarthLinux.bin --noexec --target ${srcdir}/${_pkgname} || return 1
49 package() {
50         # Install binaries and data files
51         mkdir -p ${pkgdir}/opt/${_pkgname}
52         tar -xpf ${srcdir}/${_pkgname}/googleearth-linux-x86.tar -C ${pkgdir}/opt/${_pkgname}/ || return 1
53         tar -xpf ${srcdir}/${_pkgname}/googleearth-data.tar -C ${pkgdir}/opt/${_pkgname}/ || return 1
55         # Install executable
56         install -D -m755 ${srcdir}/googleearth ${pkgdir}/usr/bin/googleearth || return 1
58         # Install .desktop file
59         install -D -m644 ${srcdir}/googleearth.desktop ${pkgdir}/usr/share/applications/googleearth.desktop || return 1
61         # Install shared MIME info package
62         install -D -m644 ${srcdir}/googleearth-mimetypes.xml ${pkgdir}/usr/share/mime/packages/googleearth-mimetypes.xml || return 1
64         # Install icon
65         install -D -m644 ${srcdir}/${_pkgname}/googleearth-icon.png ${pkgdir}/usr/share/pixmaps/googleearth-icon.png || return 1
66         
67         # Install license
68         install -D -m644 ${srcdir}/license.html ${pkgdir}/usr/share/licenses/${_pkgname}/license.html || return 1
70         # Install pango config file
71         install -D -m644 ${srcdir}/pangorc ${pkgdir}/opt/${_pkgname}/pangorc || return 1
73         # Removing provided libraries to use Arch ones (only if _use_arch_libs is set to "yes")
74         if [ "${_use_arch_libs}" == "yes" ]; then
75                 cd ${pkgdir}/opt/${_pkgname} || return 1
76                 rm ${_libs_to_remove} || return 1
77                 install -D -m644 ${srcdir}/qt.conf ${pkgdir}/opt/${_pkgname}/qt.conf
78         fi
80         # Change ownership to root
81         chown -R root:root ${pkgdir}/* || return 1