aboutsummaryrefslogtreecommitdiff
path: root/development/apache-maven/apache-maven.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/apache-maven/apache-maven.SlackBuild')
-rw-r--r--development/apache-maven/apache-maven.SlackBuild43
1 files changed, 36 insertions, 7 deletions
diff --git a/development/apache-maven/apache-maven.SlackBuild b/development/apache-maven/apache-maven.SlackBuild
index ef28d0f94623..84c978a54c97 100644
--- a/development/apache-maven/apache-maven.SlackBuild
+++ b/development/apache-maven/apache-maven.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for apache-maven
-# Copyright 2008-2009 Heinz Wiesinger <pprkut@liwjatan.at>
+# Copyright 2008-2009 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=apache-maven
-VERSION=2.1.0
-ARCH=${ARCH:-i486}
+VERSION=2.2.1
+ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -33,18 +33,47 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+MAVEN_HOME=/usr/share/maven
+
set -e
rm -rf $PKG
-mkdir -p $TMP $PKG/opt/$PRGNAM $OUTPUT
+mkdir -p $TMP $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION-bin.tar.bz2
cd $PRGNAM-$VERSION
-cp -a bin boot conf lib $PKG/opt/$PRGNAM
+
+mkdir -p $PKG/$MAVEN_HOME $PKG/usr/{bin,share/java}
+cp -a bin boot conf lib $PKG/$MAVEN_HOME
+
+# remove windows shell scripts
+rm -f $PKG/$MAVEN_HOME/bin/*.bat
+
+cd $PKG/usr/bin
+ ln -s $MAVEN_HOME/bin/mvn
+ ln -s $MAVEN_HOME/bin/mvnDebug
+cd -
+
+cd $PKG/usr/share/java
+ for jar in ../../../$MAVEN_HOME/lib/*.jar ; do
+ ln -s $jar
+ done
+
+ for jar in ../../../$MAVEN_HOME/boot/*.jar ; do
+ ln -s $jar
+ done
+cd -
mkdir -p $PKG/etc/profile.d/
-cp $CWD/profile.d/* $PKG/etc/profile.d/
+cat << EOF > $PKG/etc/profile.d/$PRGNAM.csh
+#!/bin/csh
+setenv M2_HOME ${MAVEN_HOME}
+EOF
+cat << EOF > $PKG/etc/profile.d/$PRGNAM.sh
+#!/bin/sh
+export M2_HOME=${MAVEN_HOME}
+EOF
chmod 0755 $PKG/etc/profile.d/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -55,4 +84,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}