# -*- 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        ahmetb kubectx 0.7.0 v
revision            1
categories          sysutils
platforms           darwin
supported_archs     noarch
maintainers         {breun.nl:nils @breun} @gearnode openmaintainer
license             Apache-2

description         Power tools for kubectl
long_description    kubectx helps you switch between clusters back and forth. \
                    kubens helps you switch between Kubernetes namespaces smoothly.

checksums           rmd160  f6f011e466317cc1323954ac9e5b4f3cc4bd78f7 \
                    sha256  f944d5677d82e10bc8fbdd70a835ffb0aa522402e0b57331cdc4b80f6aefeee6 \
                    size    484008

depends_run         port:bash-completion path:${prefix}/bin/kubectl:kubectl-1.16

use_configure       no
build {}

destroot    {
    xinstall -m 755 -d ${destroot}${prefix}/share/${name}
    xinstall -m 644 ${worksrcpath}/CONTRIBUTING.md \
        ${worksrcpath}/LICENSE \
        ${worksrcpath}/README.md \
        ${destroot}${prefix}/share/${name}

    xinstall -m 755 ${worksrcpath}/kubectx \
        ${worksrcpath}/kubens \
        ${destroot}${prefix}/bin

    xinstall -m 755 -d ${destroot}${prefix}/etc/bash_completion.d
    xinstall -m 644 ${worksrcpath}/completion/kubectx.bash \
        ${worksrcpath}/completion/kubens.bash \
        ${destroot}${prefix}/etc/bash_completion.d
}