Subject: [alpine-aports] [PATCH] testing/maven: new aport (revised)

From: Stuart Cardall <[email-masked]>
Date: Thu, 21 May 2015 12:47:49 +0000

with 'return 0' in build()
---
 testing/maven/APKBUILD | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
 testing/maven/maven.sh |  3 +++
 2 files changed, 58 insertions(+)
 create mode 100644 testing/maven/APKBUILD
 create mode 100644 testing/maven/maven.sh

diff --git a/testing/maven/APKBUILD b/testing/maven/APKBUILD
new file mode 100644
index 0000000..2282f79
--- /dev/null
+++ b/testing/maven/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: Stuart Cardall <[email-masked]>
+# Maintainer: Stuart Cardall <[email-masked]>
+pkgname=maven
+pkgver=3.3.3
+_pkgver=${pkgver%%.*}
+pkgrel=0
+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
+	"
+
+_builddir="$srcdir"/apache-$pkgname-$pkgver
+
+build() {
+	cd "$_builddir"
+	return 0
+}
+
+package() {
+	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"
+
+	for dir in bin boot lib; do
+		install -dm755 ${pkgdir}/${M2_HOME}/$dir || 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
+}
+
+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"
diff --git a/testing/maven/maven.sh b/testing/maven/maven.sh
new file mode 100644
index 0000000..9baa7bd
--- /dev/null
+++ b/testing/maven/maven.sh
@@ -0,0 +1,3 @@
+export MAVEN_OPTS=-Xmx512m
+export M2_HOME=/usr/share/java/maven
+export PATH=$PATH:$M2_HOME/bin
-- 
2.4.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---