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.

55 lines
1.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../apache-ant/apache-ant.conf
  5. # Copyright (C) 2007 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. # Check if a java development kit was installed.
  16. if [ -z $JAVA_HOME ]; then
  17. abort "JDK required for building $pkg"
  18. fi
  19. # We want Ant to be installed in its own directory.
  20. prefix=$prefix/apache-ant
  21. export ANT_HOME=$root/$prefix
  22. set_confopt
  23. # Custom package building and installation.
  24. ant_postmake() {
  25. # The next command will start the build and when finished
  26. # it will automatically install the new build in ANT_HOME
  27. ./build.sh install
  28. if [ $? -ne 0 ]; then
  29. # Something went wrong.
  30. abort "Building $pkg failed."
  31. fi
  32. # Now the ant commands need to be made available. This can
  33. # be done is two ways. Add the bin directory to PATH or have
  34. # links to the ant commands somewhere in the existing PATH.
  35. # Here we choose the last option to prevent PATH becoming to
  36. # large. We will place the links in the default java/bin
  37. # directory.
  38. bin_path=$(pkgprefix bindir java-dirtree)
  39. for ant_command in $(find $ANT_HOME/bin -perm +o=x -type f); do
  40. # Create a link for the current ant command.
  41. ln -sf $ant_command $bin_path/$(basename $ant_command)
  42. done
  43. # Prepare necessary environment variables.
  44. cat <<-EOF > $root/etc/profile.d/ant
  45. ANT_HOME=/$prefix
  46. export ANT_HOME
  47. EOF
  48. }
  49. hook_add postmake 5 ant_postmake