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.

76 lines
2.5 KiB

  1. #!/bin/sh
  2. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # T2 SDE: package/.../blackdown-jre/java-blackdown-conf.in
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2005 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. # Prevent normal package extraction. However since auto package
  17. # extraction is turned off, so are the pre and post patch hooks.
  18. # Instead we abuse the preconf hook to do the necessary patching.
  19. autoextract=0
  20. # Prevent executing normal make and install build steps.
  21. # This package has custom make and install.
  22. makeopt=''
  23. makeinstopt=''
  24. # Make prefix same a java_home. This way artifacts like the bin, lib
  25. # and doc directory are created at the proper level.
  26. . $base/package/*/*/java-jdk-conf.in $1
  27. java_install_opt=""
  28. java_home_original=
  29. # Check if installing needs to be done with or without X11.
  30. if ! pkginstalled xorg; then
  31. var_append java_install_opt ' ' "--nox11"
  32. fi
  33. # The archive to be installed/patched depends on the
  34. # current architecture.
  35. java_srctar=
  36. case $arch in
  37. x86) java_srctar="`match_source_file -p -i586`" ;;
  38. x86-64) java_srctar="`match_source_file -p -amd64`" ;;
  39. esac
  40. # Make sure there is a file to be patched. If not we
  41. # apparently do not support the current architecture.
  42. [ "$java_srctar" ] || abort "No binary for this architecture ($arch) detected!"
  43. # Custom pre patching.
  44. java_preconf() {
  45. # eliminate interactivity and integrity checks.
  46. cp -v $java_srctar .
  47. sed -i 's/MD5=.*$/MD5=\\"00000000000000000000000000000000\\"; SETUP_NOCHECK=1/' ${java_srctar##*/}
  48. sed -i 's/more <</agreed=1; cat <</' ${java_srctar##*/}
  49. # Retrieve the original JAVAHOME name from the archive.
  50. tempvar="`head -n15 ${java_srctar##*/} | grep JAVAHOME`"
  51. java_home_original=${tempvar/*=/}
  52. # Ready to unpack/install the archive.
  53. sh ${java_srctar##*/}
  54. }
  55. # Custom installation.
  56. java_postmake() {
  57. # Copy all stuff from the original home to our java-home.
  58. # But to make sure any possible links stay intact we use
  59. # tar | untar instead of cp.
  60. ( cd $builddir/$java_home_original; tar -c * | tar -x -C /$prefix )
  61. }
  62. hook_add preconf 5 java_preconf
  63. hook_add postmake 5 java_postmake