PortSystem 1.0
PortGroup       github 1.0

github.setup    typesafehub zinc 0.3.15 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
categories      devel java
license         Apache-2
maintainers     nomaintainer
description     A stand-alone version of sbt's incremental scala compiler
long_description \
                Zinc is a stand-alone version of sbt's incremental scala \
                compiler.
platforms       any
supported_archs noarch

master_sites    https://downloads.typesafe.com/zinc/${version}

use_configure   no
build           {}

extract.suffix  .tgz
checksums       rmd160  0b17dc840a84705bbc05be467d406f6a52d48ac7 \
                sha256  5ec4df3fa2cbb271d65a5b478c940a9da6ef4902aa8c9d41a76dd253e3334ca7 \
                size    24682167

destroot {
    set sharedir ${destroot}${prefix}/share
    set zincdir ${sharedir}/${name}
    set bindir ${zincdir}/bin

    xinstall -d -m 755 ${sharedir}
    file copy ${worksrcpath} ${zincdir}

    foreach f {nailgun zinc} {
        file attributes ${bindir}/${f} -permissions 0755
        ln -s ../share/${name}/bin/${f} \
            ${destroot}${prefix}/bin/${f}
    }
}
