From 2c43b0d2e46276f0007b2eb4e106dd24b63b90f4 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Wed, 7 Oct 2015 22:41:07 -0300 Subject: maven-3.3.3-2.parabola1: updating revision from Arch --- libre/maven/PKGBUILD | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++ libre/maven/maven.csh | 2 + libre/maven/maven.sh | 3 ++ 3 files changed, 111 insertions(+) create mode 100644 libre/maven/PKGBUILD create mode 100644 libre/maven/maven.csh create mode 100644 libre/maven/maven.sh (limited to 'libre') diff --git a/libre/maven/PKGBUILD b/libre/maven/PKGBUILD new file mode 100644 index 000000000..af9ae4ad8 --- /dev/null +++ b/libre/maven/PKGBUILD @@ -0,0 +1,106 @@ +# Maintainer: Luke Shumaker +# Maintainer (Arch): Sergej Pupykin +# Contributor (Arch): William Rea + +pkgname=maven +pkgver=3.3.3 +pkgdesc="A Java project management and project comprehension tool" +url="http://maven.apache.org" +license=('Apache') + +replaces=('maven-libre') +conflicts=('maven-libre') + +pkgrel=2.parabola1 +arch=('any') +options=(!emptydirs) +conflicts=('maven') +depends=('java-environment' 'sh') +makedepends=('apache-ant' 'jh' 'imake' + java-antlr2 + java-asm3 +) +backup=('etc/maven/settings.xml') + +_mirror=http://archive.apache.org/dist +source=($_mirror/maven/maven-${pkgver%%.*}/$pkgver/source/apache-maven-$pkgver-src.tar.gz + maven.sh maven.csh) + +_setup_env() { + unset _JAVA_OPTIONS + . /etc/profile.d/jre.sh + export MAVEN_OPTS=-Xmx512m + export M2_HOME="$pkgdir"/opt/maven + export PATH="$PATH:$M2_HOME/bin" + _M2_LOCALREPO=$(jh mvn-localrepo) + ant_args=( + -Dmaven.repo.local="$srcdir"/maven.repo.local + ) +} + +prepare() { + if type mvn &>/dev/null; then + error "maven cannot be built while an existing version is installed" + return 1 + fi +} + +build() ( + _setup_env + install -d "$srcdir"/maven.repo.local + lndir "$_M2_LOCALREPO" "$srcdir"/maven.repo.local + + cd "$srcdir"/apache-maven-$pkgver + + # FIXME: downloads makedepends from the Internet. Add them to makedepends=() + ant "${ant_args[@]}" maven-compile 2>&1|tee "$srcdir"/ant-log.txt + + < "$srcdir"/ant-log.txt \ + sed -nr 's/.*Download(ed|ing):\s*//p' | \ + sed 's/ .*//' | \ + sed -r -e 's|^http://repo.maven.apache.org/maven2/||' -e 's/\.(jar|pom)$//' | \ + sort -u > "$srcdir"/downloaded-artifacts.txt +) + +package() ( + _setup_env + cd "$srcdir"/apache-maven-$pkgver + ant "${ant_args[@]}" extract-assembly + #rm "$pkgdir"/opt/maven/*.txt + + # Install config file in /etc + # Unlike the other directories, we symlink from the system to /opt/maven + # because that way all conf files stay in /etc + #install -d "$pkgdir"/etc/maven + sed "55i$_M2_LOCALREPO" \ + < "$pkgdir"/opt/maven/conf/settings.xml + # > "$pkgdir"/etc/maven/settings.xml + #rm -rf "$pkgdir"/opt/maven/conf + #ln -s /etc/maven "$pkgdir"/opt/maven/conf + + # Install profile.d settings + install -d "$pkgdir"/etc/profile.d + install -m 755 "$srcdir"/maven.{csh,sh} "$pkgdir"/etc/profile.d + + # Link executables to /usr/bin + install -d "$pkgdir"/usr/bin + ln -s /opt/maven/bin/{mvn,mvnDebug,mvnyjp} "$pkgdir"/usr/bin + + # Link jar files to appropriate place in /usr/share + install -d "$pkgdir"/usr/share/java + ln -s /opt/maven/lib "$pkgdir"/usr/share/java/maven + + # Install the local repo + mkdir -p "$pkgdir"${_M2_LOCALREPO%/*} + cp -a "$srcdir"/maven.repo.local "$pkgdir"$_M2_LOCALREPO + # Remove extra artifacts + find "$pkgdir"$_M2_LOCALREPO -type l -delete + find "$pkgdir"$_M2_LOCALREPO -name _maven.repositories -delete + cat "$srcdir"/downloaded-artifacts.txt | while read artifact; do + rm -f "$pkgdir"$_M2_LOCALREPO/$artifact* + done +) + +md5sums=('e1db3821aa39d4b98178f68467894342' + '58820067a4d7384477daa134023d9b57' + 'e2bbdeffed100cd51d05b2ba8ebd6321') diff --git a/libre/maven/maven.csh b/libre/maven/maven.csh new file mode 100644 index 000000000..f5750cfc8 --- /dev/null +++ b/libre/maven/maven.csh @@ -0,0 +1,2 @@ +setenv MAVEN_OPTS -Xmx512m +setenv M2_HOME=/opt/maven diff --git a/libre/maven/maven.sh b/libre/maven/maven.sh new file mode 100644 index 000000000..b6655cc22 --- /dev/null +++ b/libre/maven/maven.sh @@ -0,0 +1,3 @@ +#!/bin/bash +export MAVEN_OPTS=-Xmx512m +export M2_HOME=/opt/maven -- cgit v1.2.3