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

github.setup        gravitational teleport 4.0.1 v

homepage            http://gravitational.com/teleport/
categories          net
maintainers         { gmail.com:graemelawes @gclawes } openmaintainer
description         Teleport SSH server and Certificate Authority
long_description    Teleport is a modern SSH server and CA for managing clusters \
                    that provides secure login with certificate-based access, \
                    2-factor authentication, session logging and replay, \
                    integration with Google Apps and other OAuth identity providers, \
                    and a Web UI.  Built on the Golang SSH library, and compatible with OpenSSH
license             Apache-2

checksums           rmd160  c3a256ad779b7afc7bd3464d2778121149c00277 \
                    sha256  8d110936a8501e6c7e5a8d66d0b895ee191a6bca70e626dfd7626ec10f472855 \
                    size    34915584

depends_lib         port:go port:zip
platforms           darwin
use_configure       no
worksrcdir          src/github.com/${github.author}/${github.project}

build.env-append    GOPATH=${workpath}
build.target        full
use_parallel_build  no

post-extract {
    xinstall -d ${workpath}/src/github.com/${github.author}
    move ${workpath}/${name}-${github.version} \
        ${worksrcpath}
}

destroot {
    foreach i { tctl tsh teleport } {
        xinstall ${worksrcpath}/build/${i} ${destroot}${prefix}/bin
    }
}