# -*- 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/derailed/k9s 0.50.16 v
go.offline_build    no
revision            0

homepage            https://k9scli.io

description         K9s - Kubernetes CLI To Manage Your Clusters In Style

long_description    K9s provides a curses based terminal UI to interact with \
                    your Kubernetes clusters. The aim of this project is to \
                    make it easier to navigate, observe and manage your \
                    applications in the wild. K9s continually watches \
                    Kubernetes for changes and offers subsequent commands to \
                    interact with observed Kubernetes resources.

categories          sysutils devel
installs_libs       no
license             Apache-2
maintainers         {breun @breun} \
                    {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  c954911940b51383a5cd0e5289b43ae86cbe4945 \
                    sha256  09451bea1ba2cf1d29d68eb10b6e8ffe43425b99dd849a58d9b3e9992848139b \
                    size    6812589

build.cmd           make
build.pre_args-append \
                    VERSION="${github.tag_prefix}${version}" GIT_REV="" DATE=""
build.args          build

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

    xinstall -d ${destroot}${prefix}/share/${name}
    copy ${worksrcpath}/skins   ${destroot}${prefix}/share/${name}/
    copy ${worksrcpath}/plugins ${destroot}${prefix}/share/${name}/

    set bash_completion ${prefix}/share/bash-completion/completions
    xinstall -d ${destroot}${bash_completion}
    exec ${destroot}${prefix}/bin/${name} completion bash > \
        ${destroot}${bash_completion}/${name}

    set zsh_completion ${prefix}/share/zsh/site-functions
    xinstall -d ${destroot}${zsh_completion}
    exec ${destroot}${prefix}/bin/${name} completion zsh > \
        ${destroot}${zsh_completion}/_${name}

    set fish_completion ${prefix}/share/fish/vendor_completions.d
    xinstall -d ${destroot}${fish_completion}
    exec ${destroot}${prefix}/bin/${name} completion fish > \
        ${destroot}${fish_completion}/${name}.fish
}

notes "
  ${name} skins and plugins can be found in ${prefix}/share/${name}
"
