aboutsummaryrefslogtreecommitdiff
path: root/development/apache-maven/apache-maven.SlackBuild
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-05-13 00:24:14 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:24:14 +0200
commit76c0feabec90d6ebb06fe7b2e9333b10dfb9e396 (patch)
tree199ee2b84d6ab0cebb5ebbb5450496e414aa4397 /development/apache-maven/apache-maven.SlackBuild
parentcf1177da02dd92be9c6920a076110fb53947f27f (diff)
development/apache-maven: Updated for version 2.2.1
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 ef28d0f94623f..84c978a54c97b 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}