# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/maven1/maven1.conf # Copyright (C) 2004 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- # Prevent executing normal make and install build steps. # This package has custom make and install. makeopt= makeinstopt= # Make prefix same a java_home. This way artifacts like the bin, lib # and doc directory are created at the proper level. prefix=opt/maven-${ver} set_confopt # To be able to run maven a JRE needs to be installed. To be able to # have maven compile java stuff a JDK needs to be available as well. # Todo: check for jdk, after java alternatives are working properly. # Custom installation. maven_postmake() { # Copy the extracted archive to the current prefix location. # But make sure to preserve any possible links. (cd $builddir/maven-${ver}; tar -c * | tar -x -C $root/$prefix) # Prepare necessary environment variables. cat <<-EOF > $root/etc/profile.d/maven1 MAVEN_HOME=$root/$prefix export MAVEN_HOME PATH=\$PATH:\$MAVEN_HOME/bin export PATH EOF } hook_add postmake 5 maven_postmake