# -*- 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            gitea.com/gitea/tea 0.9.2 v
go.package          code.gitea.io/tea
name                gitea-tea
revision            0

homepage            https://code.gitea.io/tea

description         A command line tool to interact with Gitea servers

long_description    {*}${description}. tea is the official CLI for Gitea. \
                    It can be used to manage most entities on one or multiple \
                    Gitea instances and provides local helpers like \'tea \
                    pull checkout\'. tea makes use of context provided by \
                    the repository in \$PWD if available, but is still usable \
                    independently of \$PWD.

categories          devel
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  9cfd4e85a9d5a66acb51ad420ac04bb165c8a57a \
                    sha256  edcd1e9af43c91c653b19ba2f58297b4815afd285657221282321ceb2930c537 \
                    size    708797

go.offline_build no

build.cmd           make
build.target        vendor build

use_parallel_build  no

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

    set zsh_comp_dir ${prefix}/share/zsh/site-functions
    xinstall -d ${destroot}/${zsh_comp_dir}
    xinstall -m 0644 ${worksrcpath}/contrib/autocomplete.zsh \
        ${destroot}${zsh_comp_dir}/_tea

    set bash_comp_dir ${prefix}/share/bash-completion/completions
    xinstall -d ${destroot}${bash_comp_dir}
    xinstall -m 0644 ${worksrcpath}/contrib/autocomplete.sh \
        ${destroot}${bash_comp_dir}/tea
}
