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.

47 lines
1.5 KiB

#!/bin/sh
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../maven1/maven1.conf
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# 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 as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- 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