aboutsummaryrefslogtreecommitdiffstats
path: root/community/maven/APKBUILD
blob: 57c7935df71bd0c24a2b02d305f262e1a3516e85 (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
45
# 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.5.2
_pkgname="$pkgname-${pkgver%%.*}"
pkgrel=0
pkgdesc="A Java project management and project comprehension tool."
url="http://maven.apache.org"
arch="noarch"
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"

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

	cd "$builddir"

	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

	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

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

sha512sums="be59d6b931503371f7399052c9b0f3bc5409aac20f5cb3efd1027169b78599e14ab63c1a1b92daba6aa85d2602b41db626a88b16d392a0d17ead8d3aa551a8b7  apache-maven-3.5.2-bin.tar.gz"