# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           maven 1.0

name                commons-cli
version             1.11.0
revision            0

categories          java
license             Apache-2
maintainers         nomaintainer
platforms           any
supported_archs     noarch

description         Jakarta Commons-CLI
long_description    The Jakarta Commons CLI library provides an API for \
                    processing command line interfaces. It was formed by \
                    the merger of ideas and code from three different \
                    libraries - Werken, Avalon and Optz.
homepage            https://commons.apache.org/proper/commons-cli/

distname            ${name}-${version}-src
master_sites        apache:commons/cli/source/
checksums           rmd160  1fff8f025f8295b45ba2cde15ebcd66d1dc0dd0b \
                    sha256  b2bb70c9e1103590e4371319bd404e96f74f5b14bd8c4b023498326608d2e96e \
                    size    302658

java.version        1.8+
java.fallback       openjdk11

destroot {
    set destdocdir  ${destroot}${prefix}/share/doc/${name}
    set destjavadir ${destroot}${prefix}/share/java

    xinstall -d ${destjavadir}
    xinstall -m 644 \
        ${worksrcpath}/target/${name}-${version}.jar \
        ${destjavadir}/${name}.jar

    xinstall -d ${destdocdir}
    xinstall -m 644 \
        ${worksrcpath}/CONTRIBUTING.md \
        ${worksrcpath}/LICENSE.txt \
        ${worksrcpath}/NOTICE.txt \
        ${worksrcpath}/README.md \
        ${worksrcpath}/RELEASE-NOTES.txt \
        ${destdocdir}
}

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