# -*- 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/bmf-san/ggc 5.0.0 v
revision            0

description         \
    A modern Git CLI tool with both traditional command-line and interactive \
    incremental-search UI.

long_description    \
    ${name} is a Git tool written in Go, offering both traditional CLI \
    commands and an interactive interface with incremental search. You can \
    either run subcommands like ggc add directly, or launch the interactive \
    mode by simply typing ggc. Designed to be fast, user-friendly, and \
    extensible.

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

go.offline_build    no

build.args-append   \
    -ldflags \" -X main.version=${version} \"

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
    # Check ${worksrcpath}/tools/completions/ for all supported shells
    set comp_path(bash) ${destroot}${prefix}/share/bash-completion/completions/${name}
    set comp_path(fish) ${destroot}${prefix}/share/fish/completions/${name}.fish
    set comp_path(zsh)  ${destroot}${prefix}/share/zsh/site-functions/_${name}
    foreach shell {bash fish zsh} {
        xinstall -d [file dirname $comp_path(${shell})]
        xinstall -m 0644 ${worksrcpath}/tools/completions/${name}.${shell} $comp_path(${shell})
    }
}

checksums           rmd160  0be63e2145a5f70d837bb5e4703792f590db656a \
                    sha256  8602c62d8005c708a4e54cff6da2f21fe31753d2fd24b588bba7d67993441bda \
                    size    1192683
