# -*- 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.2 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  272dc677189901409c8a6cc4c8d7e4f33f475218 \
                    sha256  ccf971c33149979c9399954ff5742ab236cc7e9665a75955a962f9c9fafcb3d5 \
                    size    2412582

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