PortSystem 1.0
PortGroup java 1.0

name				commons-codec
version				1.20.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           sha1    b853245cb16276f0be24923ac67cd28bd74dbf7f \
                    rmd160  38f8d53fe61485b45ab62fa2d3dc7b4c485083bc \
                    sha256  6e8c904cc3d2b53b008a86d985322afce02479628bdc29c4685ac779f6ac14de \
                    size    554550

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"
