|
|
|
@ -12,27 +12,35 @@
|
|
|
|
|
# GNU General Public License can be found in the file COPYING. |
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
|
|
|
|
|
|
# Set a custom install prefix. |
|
|
|
|
if [ $prefix_auto = 1 ] ; then |
|
|
|
|
prefix="opt/googleearth" |
|
|
|
|
set_confopt |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# comes as script with a bzip2 at the end so we need to find out |
|
|
|
|
# how many bytes the archive is and then extract it using tail |
|
|
|
|
|
|
|
|
|
install_googleearth(){ |
|
|
|
|
if [ $prefix_auto = 1 ] ; then |
|
|
|
|
prefix="opt/google" |
|
|
|
|
fi |
|
|
|
|
# Determine the size of the archive. |
|
|
|
|
googleebin="archdir/GoogleEarthLinux-*.bin" |
|
|
|
|
binsize=$(strings $googleebin |grep "filesizes="|head -n 1|sed 's,[^0-9],,g') |
|
|
|
|
|
|
|
|
|
# Extract the archive. |
|
|
|
|
mkdir googleearth |
|
|
|
|
tail --bytes $binsize $googleebin | tar -xjf - -C googleearth |
|
|
|
|
if [ ! -d $root/$prefix/google-earth ];then |
|
|
|
|
mkdir -pv $root/$prefix/google-earth |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Do the actual installation. |
|
|
|
|
mkdir -pv $root/$prefix/google-earth |
|
|
|
|
tar -xvf googleearth/googleearth-linux-x86.tar -C $root/$prefix/google-earth |
|
|
|
|
tar -xvf googleearth/googleearth-data.tar -C $root/$prefix/google-earth |
|
|
|
|
if [ ! -d $root/$prefix/bin ];then |
|
|
|
|
mkdir -v $root/$prefix/bin |
|
|
|
|
fi |
|
|
|
|
mkdir -pv $root/$prefix/bin |
|
|
|
|
install -m 755 googleearth/bin/* $root/$prefix/bin |
|
|
|
|
|
|
|
|
|
# Install documentation. |
|
|
|
|
cp -vf googleearth/*.html $docdir |
|
|
|
|
|
|
|
|
|
# Make sure the necessary environment vars will be set.h |
|
|
|
|
echo "export GOOGLEEARTH_DATA_PATH=$root/$prefix/google-earth" > \ |
|
|
|
|
$sysconfdir/profile.d/googleearth |
|
|
|
|
} |
|
|
|
|