aboutsummaryrefslogtreecommitdiffstats
path: root/community/maven/APKBUILD
blob: 0c32573ac28a42c72d4bff6b3b49de5625c3a7c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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.6.2
_pkgname="$pkgname-${pkgver%%.*}"
pkgrel=0
pkgdesc="A Java project management and project comprehension tool."
url="http://maven.apache.org"
arch="noarch"
license="Apache-2.0"
options="!check" # repackaged release without a test suite
depends="openjdk8-jre"
source="http://mirror.hosting90.cz/apache/maven/$_pkgname/$pkgver/binaries/apache-maven-$pkgver-bin.tar.gz"
builddir="$srcdir/apache-$pkgname-$pkgver"

package() {
	local m2_home="/usr/share/java/$_pkgname"
	local destdir="${pkgdir}$m2_home"

	local dir; for dir in bin boot lib; do
		mkdir -p -m755 "$destdir/$dir"
	done

	install -m644 -Dt "$destdir"/bin ./bin/*.conf
	install -m644 -Dt "$destdir"/boot ./boot/*.jar
	install -m644 -Dt "$destdir"/lib ./lib/*.jar
	cp -Rp ./conf "$destdir"/

	mkdir -p "$pkgdir"/usr/bin

	local file; for file in mvn mvnDebug mvnyjp; do
		install -m755 -Dt "$destdir"/bin ./bin/$file
		ln -sf "$m2_home"/bin/$file "$pkgdir"/usr/bin/$file
	done

	mkdir "$pkgdir"/etc
	cat > "$pkgdir"/etc/mavenrc <<-EOF
		M2_HOME="$m2_home"
		MAVEN_OPTS="\$MAVEN_OPTS -Xmx512m"
	EOF
}

sha512sums="d941423d115cd021514bfd06c453658b1b3e39e6240969caf4315ab7119a77299713f14b620fb2571a264f8dff2473d8af3cb47b05acf0036fc2553199a5c1ee  apache-maven-3.6.2-bin.tar.gz"