# Template file for 'apache-maven'
pkgname=apache-maven
version=3.5.4
revision=1
hostmakedepends="openjdk"
depends="virtual?java-environment"
noarch=yes
short_desc="Software project management and comprehension tool"
maintainer="Michael Aldridge <maldridge@VoidLinux.eu>"
license="Apache-2.0"
homepage="https://maven.apache.org/"
distfiles="https://www-us.apache.org/dist/maven/maven-3/${version}/source/${pkgname}-${version}-src.tar.gz
 https://www-us.apache.org/dist/maven/maven-3/${version}/binaries/apache-maven-${version}-bin.tar.gz"
checksum="f3ba1f1b24bbd4c345174ac616d40e26e72dad6022d56317d3ff6f7dd003e2f5
 ce50b1c91364cb77efe3776f756a6d92b76d9038b0a0782f7d53acf1e997a14d"

do_build() {
	./bin/mvn package -DskipTests -Drat.skip=true -Dmaven.repo.local=repo -DdistributionTargetDir=${DESTDIR}/usr/share/${pkgname}/
}

do_install() {
	mkdir -p ${DESTDIR}/etc/profile.d
	vinstall ${FILESDIR}/apache-maven.sh 0755 etc/profile.d/
	vlicense LICENSE
}
