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

go.setup            github.com/hashicorp/packer 1.14.3 v
go.offline_build    no
revision            0

homepage            https://www.packer.io

description         \
    A tool for creating identical machine images for multiple platforms from \
    a single source configuration.

long_description    \
    {*}${description} Packer is lightweight, runs on every major operating \
    system, and is highly performant, creating machine images for multiple \
    platforms in parallel. Packer comes out of the box with support for many \
    platforms, the full list of which can be found at \
    https://www.packer.io/docs/builders/index.html.

categories          sysutils
installs_libs       no
# Packer 1.10.0 onwards is licensed as per Hashicorp's Business Source License
license             Commercial Permissive
maintainers         {gmail.com:newtonne.github @newtonne} \
                    {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  5a9344210a11eceaceaca0e0d84aaace0631af85 \
                    sha256  60e77b89481d44cf9a7b73a6816a89d6153eaed07c6be5ecac0c0e15ea943c02 \
                    size    2414573

depends_build-append port:realpath

build.env-append    XC_ARCH=${goarch} \
                    XC_OS=darwin

build.cmd           make
build.target        releasebin

destroot {
    xinstall -m 0755 \
        ${worksrcpath}/bin/${name} ${destroot}${prefix}/bin/${name}
}

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