PortSystem 1.0
PortGroup java 1.0

name				commons-codec
version				1.21.0

categories			java
license				Apache-2
maintainers			nomaintainer

description			Jakarta Commons-Codec
long_description	Commons Codec provides implementations of common encoders and \
					decoders such as Base64, Hex, various phonetic encodings, and URLs.
homepage			https://commons.apache.org/codec/
				
distname			${name}-${version}-src
master_sites		apache:commons/codec/source/

checksums           rmd160  ff7f5aac323dc299b1912540b4fc50247cd4b914 \
                    sha256  bc9b14b2ebc78f90b54f59f08226492c0f91a6395da48160b9fa7a5a0d0cfc0d \
                    size    572343

java.version        11+
java.fallback       openjdk11

depends_build       bin:mvn3:maven3

use_configure       no

set maven_local_repository ${worksrcpath}/.m2/repository
pre-build {
    file mkdir ${maven_local_repository}
}

build.cmd           mvn3
build.target		package
build.pre_args-append \
                    -Dmaven.repo.local=${maven_local_repository}

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
	xinstall -m 644 \
		${worksrcpath}/target/${name}-${version}.jar \
		${destroot}${prefix}/share/java/
}

livecheck.type  regex
livecheck.url   https://commons.apache.org/proper/commons-codec/download_codec.cgi
livecheck.regex "${name}-(\\d+\\.\\d+(\\.\\d+)?)-src.tar.gz"
