# -*- 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.18 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  f78d0e5bd95f6bba68b6919beea0e39e45ab47af \
                    sha256  df31cff6e82558869133b9d6621cd5719719df02e3df645f4831c671ef23e63d \
                    size    299133

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