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.

62 lines
2.0 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../ibm-jre-142/java-ibm-conf.in
  6. # Copyright (C) 2006 - 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. # Remember the type of package (jre or jdk)
  18. java_pkg_type=$1
  19. # Prevent executing normal make and install build steps.
  20. # This package has custom make and install.
  21. makeopt=
  22. makeinstopt=
  23. # Make prefix same a java_home. This way artifacts like the bin, lib
  24. # and doc directory are created at the proper level.
  25. . $base/package/*/*/java-jdk-conf.in $java_pkg_type
  26. # The archive to be installed/patched depends on the
  27. # current architecture.
  28. case $arch in
  29. x86) srctar="`match_source_file x86.t`" ;
  30. if [ -z "$srctar" ]; then
  31. srctar="`match_source_file 386.t`";
  32. fi ;;
  33. x86-64) srctar="`match_source_file x86_64`" ;;
  34. powerpc64) srctar="`match_source_file ppc64`" ;;
  35. powerpc) srctar="`match_source_file ppc`" ;;
  36. esac
  37. # Make sure there is a file to be patched. If not we
  38. # apparently do not support the current architecture.
  39. [ "$srctar" ] || abort "No binary for this architecture ($arch) detected!"
  40. # Custom installation.
  41. java_postmake() {
  42. if [ $java_pkg_type == jre ]; then
  43. # Move the contents of the jre directory up one dir.
  44. for entry in $(ls -A jre); do
  45. mv jre/$entry .
  46. done
  47. rm -rf jre
  48. fi
  49. # Copy the extracted archive to the current prefix location.
  50. # But make sure to preserve any possible links.
  51. tar -c {.,}[a-zA-Z0-9]* | tar -x -C /$prefix
  52. }
  53. hook_add postmake 5 java_postmake