# -*- 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/Versent/saml2aws 2.36.19 v
go.package          github.com/versent/saml2aws
go.offline_build    no
revision            0

categories          security
platforms           darwin
license             MIT
maintainers         {netinertia.co.uk:jamesog @jamesog} \
                    {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

description         Log in to AWS using a SAML IDP
long_description    CLI tool which enables you to login and retrieve AWS \
                    temporary credentials using a SAML IDP.

homepage            https://github.com/Versent/saml2aws

checksums           rmd160  8aec4d57ca1d598883b65d48c7a3f1882613ddcc \
                    sha256  208ec9e1f2e8c7e1770990825bc5e56c65cd86e8362e1a3e6fa1ef5ecc7bbc91 \
                    size    302533

if {${os.platform} eq "darwin" && ${os.major} < 13} {
    # The github.com/keybase/go-keychain dependency requires >= 10.9
    known_fail yes
    pre-fetch {
        ui_error "${name} requires OS X 10.9 or greater"
        return -code error "unsupported platform version"
    }
}

build.pre_args      -trimpath -ldflags \"-s -w -X main.Version=${version}\"
build.args          ./cmd/${name}

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

github.livecheck.regex {(\d+(?:\.\d+)+)}