# -*- 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.15.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  e119304e3461559b8d88efc46b5b6f40f931e79f \
                    sha256  69db1a7cb08b4766b0a397d864e23d0fbad348e26c82eabac6d6bdd9fb9d5bf5 \
                    size    2481869

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.]+)}
