OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../googleearth/googleearth.conf
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. # Set a custom install prefix.
  15. if [ $prefix_auto = 1 ] ; then
  16. prefix="opt/googleearth"
  17. set_confopt
  18. fi
  19. # comes as script with a bzip2 at the end so we need to find out
  20. # how many bytes the archive is and then extract it using tail
  21. custextract=googleearth_extract
  22. googleearth_extract() {
  23. local filesizes=
  24. # Determine the size of the archive.
  25. eval $( strings "$1" | grep '^filesizes=' )
  26. # Extract the archive.
  27. echo "Extracting $xsrctar:$filesizes ($taropt) ... "
  28. mkdir googleearth
  29. tail --bytes $filesizes $1 | tar -v $taropt - -C googleearth > untar.txt
  30. }
  31. makeopt=
  32. makeinstopt=
  33. hook_add postmake 5 'googleearth_install'
  34. googleearth_install() {
  35. # Do the actual installation.
  36. mkdir -pv $root/$prefix/google-earth
  37. tar -xvf googleearth-linux-x86.tar -C $root/$prefix/google-earth
  38. tar -xvf googleearth-data.tar -C $root/$prefix/google-earth
  39. install -m 755 bin/* $root$bindir/
  40. # Make sure the necessary environment vars will be set.h
  41. cat <<-EOT > $root/etc/profile.d/googleearth
  42. export GOOGLEEARTH_DATA_PATH="/$prefix/google-earth"
  43. EOT
  44. }