# -*- 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

name             typesafe-activator
version          1.3.12
categories       java devel
platforms        any
supported_archs  noarch
license          Apache-2
maintainers      nomaintainer

description      TypeSafe activator framework used by the java web play framework

long_description \
    Play Framework makes it easy to build web applications with Java & Scala. \
    Play is based on a lightweight, stateless, web-friendly architecture. \
    Built on Akka, Play provides predictable and minimal resource consumption \
    (CPU, memory, threads) for highly-scalable applications.

homepage         https://www.playframework.com

master_sites     https://downloads.typesafe.com/${name}/${version}/
worksrcdir       activator-dist-${version}

checksums        rmd160 22b6dff199f48e7cb59e24b6afd6c8d3a2a3f373 \
                 sha256 3740355ce4d4c099b9349704dc5851341e731981b25094b7b7dcefe7eceff530

use_configure   no
use_zip         yes

build           {}

destroot        {
    set activatordir ${destroot}${prefix}/share/java/${name}

    xinstall -m 755 -d ${activatordir}

    foreach {item} { \
            LICENSE.html \
            README.html \
            bin \
            lib \
            libexec \
            repository \
            templates \
    } {
        file copy ${worksrcpath}/${item} ${activatordir}
    }

    file attributes ${activatordir}/bin/activator -permissions 0755

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

livecheck.type  regex
livecheck.url   https://dl.bintray.com/typesafe/ivy-releases/com.typesafe.activator/activator-launcher/
livecheck.regex {>([0-9.]+)/<}
