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.

49 lines
1.6 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../maven/maven.conf
  6. # Copyright (C) 2007 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  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. # --- SDE-COPYRIGHT-NOTE-END ---
  16. # Prevent executing normal make and install build steps.
  17. # This package has custom make and install.
  18. makeopt=''
  19. makeinstopt=''
  20. # Make prefix same a java_home. This way artifacts like the bin, lib
  21. # and doc directory are created at the proper level.
  22. prefix=opt/maven2
  23. set_confopt
  24. # To be able to run maven a JRE needs to be installed. To be able to
  25. # have maven compile java stuff a JDK needs to be available as well.
  26. # Todo: check for jdk, after java alternatives are working properly.
  27. # Custom installation.
  28. maven_postmake() {
  29. # Copy the extracted archive to the current prefix location.
  30. # But make sure to preserve any possible links.
  31. ( cd $builddir/maven-${ver}; tar -c * | tar -x -C $root/$prefix )
  32. # Unfortunately the acces right need to be changed. The archive
  33. # was probably created under Windows.
  34. chmod +ux $root/$prefix/bin/mvn
  35. chmod -R +ur $root/$prefix
  36. # Prepare necessary environment variables.
  37. cat <<-EOF > $root/etc/profile.d/maven
  38. PATH=\$PATH:$root/$prefix/bin
  39. export PATH
  40. EOF
  41. }
  42. hook_add postmake 5 maven_postmake