# -*- 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-lang
version                 2.6

categories              java
license                 Apache-2
platforms               any
supported_archs         noarch
homepage                https://commons.apache.org/proper/commons-lang
maintainers             nomaintainer

description             Jakarta Commons-Lang
long_description        The Lang Component provides a host of helper utilities \
                        for the java.lang API, notably String manipulation \
                        methods, basic numerical methods, object reflection, \
                        creation and serialization, and System properties. \
                        Additionally it contains an inheritable enum type, an \
                        exception structure that supports multiple types of \
                        nested-Exceptions, basic enhancements to \
                        java.util.Date and a series of utlities dedicated to \
                        help with building methods, such as hashCode, toString \
                        and equals.

# Building requires 8 >= Java >= 3
# Running requires Java >= 3
java.version            1.8
java.fallback           openjdk8

master_sites            apache:commons/lang/source/
distname                ${name}-${version}-src

checksums               rmd160  9542bcc3323ddf1e93400e68f9e4d527c71bffd0 \
                        sha256  05479771851be0af057032fa26ad90aa0c91c10e1fc4439558a1ffa6f053bcd7 \
                        size    564032

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

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

    xinstall -d ${destdocdir}
    xinstall -W ${worksrcpath} -m 644 \
        LICENSE.txt \
        NOTICE.txt \
        PROPOSAL.html \
        RELEASE-NOTES.txt \
        ${destdocdir}
}

livecheck.type          regex
livecheck.url           https://commons.apache.org/lang/download_lang.cgi
livecheck.regex         "${name}-(2(\\.\[0-9]+)*)-src\\.tar\\.gz"
