wok view get-google-earth/stuff/get-google-earth @ rev 2804

update qt-4.4.1 to qt-4.5.0
author Allan Pinto <allan316@gmail.com>
date Wed Apr 29 09:28:07 2009 +0000 (2009-04-29)
parents 68e403f01006
children 32959e7975fc
line source
1 #!/bin/sh -e
3 DEPENDS="mesa"
4 ROOT="$1"
6 if test $(id -u) != 0 ; then
7 echo -e "\nYou must be root to run `basename $0`."
8 echo -e "Please type 'su' and root password to become super-user.\n"
9 exit 0
10 fi
12 if [ -d $ROOT/var/lib/tazpkg/installed/google-earth ]; then
13 [ -n "$ROOT" ] && exit 1
14 tazpkg remove google-earth
15 [ -d /var/lib/tazpkg/installed/google-earth ] && exit 1
16 fi
18 TMP_DIR=/tmp/get-google-earth-$$-$RANDOM
19 CUR_DIR=$(pwd)
20 mkdir -p $TMP_DIR && cd $TMP_DIR
22 # Download tarball
23 wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin
24 chmod +x GoogleEarthLinux.bin
25 sed -i 's/bzip2 -d/bunzip2/g' GoogleEarthLinux.bin
27 VERSION=$(head GoogleEarthLinux.bin | grep ^label | sed 's/.*Linux \(.*\)"/\1/')
29 # Add depends
30 for i in $DEPENDS; do
31 yes y | tazpkg get-install $i
32 done
34 # Extract
35 ./GoogleEarthLinux.bin
37 # Create pseudo package
38 while read file; do
39 dest=google-earth-$VERSION/fs$(dirname $file)
40 [ -d $dest ] || mkdir -p $dest
41 cp -a $file $dest
42 done <<EOT
43 $(ls /*bin/googleearth /usr/*bin/googleearth 2> /dev/null)
44 $(ls /usr/share/applications/*googleearth*.desktop)
45 /usr/share/applications/defaults.list
46 $(ls -d /usr/*/google-earth)
47 EOT
48 cat > google-earth-$VERSION/receipt <<EOT
49 PACKAGE="google-earth"
50 VERSION="$VERSION"
51 CATEGORY="non-free"
52 SHORT_DESC="3D planet viewer."
53 WEB_SITE="http://earth.google.com/"
54 DEPENDS="$DEPENDS"
55 EOT
57 # Pack
58 tazpkg pack google-earth-$VERSION
60 # Install pseudo package
61 tazpkg install google-earth-$VERSION.tazpkg --root=$ROOT
63 # Clean
64 cd $CUR_DIR
65 rm -rf $TMP_DIR