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

github.setup        amberframework amber 0.9.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball

categories          www devel
license             MIT
maintainers         {@conradwt gmail.com:conradwt} openmaintainer

description         Crystal web application framework

long_description    Amber is web application framework implemented in the Crystal \
                    programming language that makes building applications fast, \
                    simple, and enjoyable. Get started with quick prototyping, \
                    less bugs, and blazing fast performance. 

depends_lib         port:crystal \
                    port:postgresql10-server \
                    port:redis \
                    port:shards

checksums           rmd160  a40f3bfda8b651defeab79436ac507ca237342fb \
                    sha256  b4e2620fa4ccdc03ab427d6eb7f8a61395c505f596a92d04bf431ac2d9577062 \
                    size    178051

pre-fetch {
  if {${os.major} < 16} {
    ui_error "${name} @${version} requires macOS 10.12 or newer."
    return -code error "incompatible macOS version"
  }
}

use_configure       no

build.args          CRFLAGS=--release
build.cmd           ${prefix}/bin/shards install && ${build.cmd}

destroot.destdir    PREFIX=${destroot}${prefix}

test.run            yes
