# -*- 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                terraform
version             0.12.9

categories          sysutils
license             MPL-2
maintainers         {emcrisostomo @emcrisostomo} {gmail.com:herby.gillot @herbygillot} openmaintainer
platforms           darwin
supported_archs     x86_64

description         A tool for building, changing, and versioning \
                    infrastructure safely and efficiently.
long_description \
                    Terraform is an infrastructure as code software \
                    by HashiCorp. It allows users to define a datacenter \
                    infrastructure in a high-level configuration language, \
                    from which it can create an execution plan to build \
                    the infrastructure in a service provider such as AWS.

homepage            https://www.terraform.io/downloads.html

master_sites        https://releases.hashicorp.com/${name}/${version}
distname            ${name}_${version}_darwin_amd64

checksums           rmd160  926aa4fb360badb2f5bc29d984a68ef7c97b91a2 \
                    sha256  dbb3c0ffb37a5e659e05b8c223a717f89ffda7761d23eaf596c31b9745557288 \
                    size    16768906

use_configure       no
use_zip             yes
extract.mkdir       yes

# The default build is a binary install.
build {
}

destroot {
    file copy ${worksrcpath}/terraform ${destroot}${prefix}/bin
}

livecheck.type      regex
livecheck.url       https://releases.hashicorp.com/terraform/
livecheck.regex     >terraform_(\\d+(\\.\\d+)+)<