aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-03-19 00:01:02 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2016-03-30 08:23:14 +0000
commit38ea3fe40cd545eb2d3e9c3a04d77c207f3f4724 (patch)
tree6ebcc1033a44740fc20f9c3505b76558ac66e188
parent4da54fb8642d24af25365db09c249c156ca94c30 (diff)
downloadaports-38ea3fe40cd545eb2d3e9c3a04d77c207f3f4724.tar.gz
aports-38ea3fe40cd545eb2d3e9c3a04d77c207f3f4724.tar.bz2
aports-38ea3fe40cd545eb2d3e9c3a04d77c207f3f4724.tar.xz
testing/maven: refactor abuild and upgrade to 3.3.9
-rw-r--r--testing/maven/APKBUILD73
-rw-r--r--testing/maven/maven.sh3
2 files changed, 33 insertions, 43 deletions
diff --git a/testing/maven/APKBUILD b/testing/maven/APKBUILD
index 2282f79363..6bb57b5f80 100644
--- a/testing/maven/APKBUILD
+++ b/testing/maven/APKBUILD
@@ -1,55 +1,48 @@
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=maven
-pkgver=3.3.3
-_pkgver=${pkgver%%.*}
+pkgver=3.3.9
+_pkgname="$pkgname-${pkgver%%.*}"
pkgrel=0
-pkgdesc="A Java project management and project comprehension tool"
+pkgdesc="A Java project management and project comprehension tool."
url="http://maven.apache.org"
arch="noarch"
-license="APACHE"
-depends="openjdk7-jre"
-subpackages="$pkgname-doc"
-source="http://apache.proserve.nl/$pkgname/$pkgname-$_pkgver/$pkgver/binaries/apache-$pkgname-$pkgver-bin.tar.gz
- maven.sh
- "
+license="ASL 2.0"
+depends="openjdk8-jre"
+source="http://mirror.hosting90.cz/apache/$pkgname/$_pkgname/$pkgver/binaries/apache-$pkgname-$pkgver-bin.tar.gz"
-_builddir="$srcdir"/apache-$pkgname-$pkgver
-
-build() {
- cd "$_builddir"
- return 0
-}
+_builddir="$srcdir/apache-$pkgname-$pkgver"
package() {
+ local m2_home="/usr/share/java/$_pkgname"
+ local destdir="${pkgdir}${m2_home}"
+
cd "$_builddir"
- local M2_HOME="/usr/share/java/$pkgname-$pkgver"
- install -dm755 ${pkgdir}/etc/profile.d || return 1
- install -dm755 ${pkgdir}/usr/share/doc/${pkgname} || return 1
- install -dm755 ${pkgdir}${M2_HOME} || return 1
- install -D -m 755 ${srcdir}/maven.sh ${pkgdir}/etc/profile.d/maven.sh || return 1
- sed -i "s|export M2_HOME=.*|export M2_HOME=$M2_HOME|" "$pkgdir/etc/profile.d/$pkgname.sh"
+ local dir; for dir in bin boot lib; do
+ mkdir -p -m755 "$destdir/$dir"
+ done
+
+ install -m644 -Dt "$destdir"/bin ./bin/*.conf || return 1
+ install -m644 -Dt "$destdir"/boot ./boot/*.jar || return 1
+ install -m644 -Dt "$destdir"/lib ./lib/*.jar || return 1
+ cp -Rp ./conf "$destdir"/ || return 1
- for dir in bin boot lib; do
- install -dm755 ${pkgdir}/${M2_HOME}/$dir || return 1
+ mkdir -p "$pkgdir"/usr/bin || return 1
+
+ local file; for file in mvn mvnDebug mvnyjp; do
+ install -m755 -Dt "$destdir"/bin ./bin/$file || return 1
+ ln -sf "$m2_home"/bin/$file "$pkgdir"/usr/bin/$file || return 1
done
- find ./bin -type f -a ! -name \*.bat -a ! -name \*.cmd -a ! -name \*.conf \
- -exec install -m755 {} ${pkgdir}/${M2_HOME}/bin \; || return 1
- install -m644 ./bin/*.conf ${pkgdir}/${M2_HOME}/bin || return 1
- install -m644 ./boot/*.jar ${pkgdir}/${M2_HOME}/boot || return 1
- install -m644 ./lib/*.jar ${pkgdir}/${M2_HOME}/lib || return 1
- cp -Rp ./conf ${pkgdir}/${M2_HOME}/ || return 1
-
- install -dm755 ${pkgdir}/usr/share/licenses/${pkgname} || return 1
- install -m644 LICENSE NOTICE ${pkgdir}/usr/share/licenses/${pkgname} || return 1
- install -m644 README.txt ${pkgdir}/usr/share/doc/${pkgname} || return 1
- install -m644 ./lib/*.license ${pkgdir}/usr/share/licenses/${pkgname} || return 1
+
+ mkdir "$pkgdir"/etc || return 1
+ cat > "$pkgdir"/etc/mavenrc <<-EOF
+ M2_HOME="$m2_home"
+ MAVEN_OPTS=-Xmx512m
+ EOF
}
-md5sums="794b3b7961200c542a7292682d21ba36 apache-maven-3.3.3-bin.tar.gz
-574de91f3dc3ecd685aa996be012c92b maven.sh"
-sha256sums="3a8dc4a12ab9f3607a1a2097bbab0150c947ad6719d8f1bb6d5b47d0fb0c4779 apache-maven-3.3.3-bin.tar.gz
-e5e5b4510ed816acba2e9ee678867c726acf575c7a79e91827ec499bb6b9586a maven.sh"
-sha512sums="ca64847b7980f5c406f15d433f86a77dc81aa9676baf09122061c72b3ec5790bc664896c37e0571bb2a0bfb48a1d67b0bff1c67d73d796252a132dd46724ccd5 apache-maven-3.3.3-bin.tar.gz
-bd4d731ccfaf6b04254ee7fd83e69f12a24550f16896f4427dd0ef90f54625407a325793a2ee15852df0cc19167ce27dc29bf20edf342dba270951912a8f519e maven.sh"
+md5sums="516923b3955b6035ba6b0a5b031fbd8b apache-maven-3.3.9-bin.tar.gz"
+sha256sums="6e3e9c949ab4695a204f74038717aa7b2689b1be94875899ac1b3fe42800ff82 apache-maven-3.3.9-bin.tar.gz"
+sha512sums="9b4b22aba67af48648c634e30edbb03de2a7742b7d4e58b3d637fcd20358a51ccb288dcbd473169a58b9322f7c8fbedcf5336b87d06460d0b20ce37d4c3948b0 apache-maven-3.3.9-bin.tar.gz"
diff --git a/testing/maven/maven.sh b/testing/maven/maven.sh
deleted file mode 100644
index 9baa7bd4d7..0000000000
--- a/testing/maven/maven.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export MAVEN_OPTS=-Xmx512m
-export M2_HOME=/usr/share/java/maven
-export PATH=$PATH:$M2_HOME/bin