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.
50 lines
1.7 KiB
50 lines
1.7 KiB
#!/bin/sh |
|
# --- T2-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# T2 SDE: package/.../maven/maven.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/maven2 |
|
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 ) |
|
|
|
# Unfortunately the acces right need to be changed. The archive |
|
# was probably created under Windows. |
|
chmod +ux $root/$prefix/bin/m2 |
|
chmod +ur $root/$prefix/bin/m2.conf |
|
chmod +ux $root/$prefix/lib/* |
|
chmod -R +ux $root/$prefix/core |
|
|
|
# Prepare necessary environment variables. |
|
cat <<-EOF > $root/etc/profile.d/maven |
|
PATH=\$PATH:$root/$prefix/bin |
|
export PATH |
|
EOF |
|
} |
|
|
|
hook_add postmake 5 maven_postmake
|
|
|