# -*- 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        b4nst turbogit 5.0.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
categories          devel
supported_archs     x86_64 arm64
license             MIT
maintainers         {gmail.com:bastyen.a @b4nst} openmaintainer

description         Your git boat friend
long_description    Opinionated cli enforcing clean git workflow without comprising UX

fetch.type          git

post-fetch {
    system -W ${worksrcpath} "git submodule update --init --recursive"
}

use_configure       no
installs_libs       no

depends_build       port:go \
                    path:bin/cmake:cmake \
                    port:pkgconfig

build.target        build
build.env-append    TUG_VERSION=${version}
build.env-append    TUG_COMMIT=refs/tags/v${version}
use_parallel_build  no

destroot {
    xinstall -m 0755 -W ${worksrcpath} dist/bin/tug ${destroot}${prefix}/bin

    set docdir ${prefix}/share/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} LICENSE ${destroot}${docdir}
}

github.livecheck.regex \
                    {([0-9.-]+)}

notes "
Thank you for using turbogit. To install shell completion for supported shells run:

    tug completion <your_shell>
"
