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.

77 lines
2.5 KiB

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