# -*- 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       github 1.0
PortGroup       java 1.0

github.setup    sbt sbt 1.9.8 v
revision        0
categories      devel java
license         Apache-2
maintainers     nomaintainer
platforms       any

description     Simple build tool (sbt) simplifies building Scala projects

long_description \
    Simple build tool (sbt) is provides unintrusive and easy to set up \
    for simple Scala projects. All configuration, customization, and \
    extension are done in Scala.  Sbt supports continuous compilation \
    and testing with triggered execution in mixed Scala/Java projects.

homepage        https://www.scala-sbt.org/

checksums       rmd160  aa83d3594d69c320b1cd1d3c1577f26cdd058195 \
                sha256  a86fffe35f066b65d5e02ebb4a2cad1cfbb418f830bf5f73d27f3073eecafdcd \
                size    47260785

java.version    1.8+

extract.suffix  .tgz
extract.rename  yes
github.tarball_from releases

supported_archs noarch
use_configure   no
build           {}

destroot {
    set sbtdir ${destroot}${prefix}/share/${name}

    xinstall -m 755 -d ${sbtdir}
    file copy \
        ${worksrcpath}/bin \
        ${worksrcpath}/conf \
        ${sbtdir}

    foreach f [glob -directory ${sbtdir}/conf *] {
        file attributes $f -permissions 0644
    }

    foreach f [glob -directory ${sbtdir}/bin *] {
        file attributes $f -permissions 0755
    }

    xinstall -m 0644 -W ${worksrcpath} LICENSE NOTICE ${sbtdir}

    ln -s ${prefix}/share/${name}/bin/${name} ${destroot}${prefix}/bin
}

github.livecheck.regex  {([0-9.]+)}
