# -*- 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.51.0 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  3c65a9645d4d1a4341ac812c73f372344a1e046e \
                    sha256  e2c3851c909b87f9cfafa262e426f4a89023ca4e745cba5cab6d0153f76e7dcd \
                    size    6838746

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}
"
