# -*- 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/Clever/microplane 0.0.37 v
revision            0

description         A CLI tool to make git changes across many repos, \
                    especially useful with Microservices.

long_description    {*}${description}

maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

categories          devel
license             Apache-2
platforms           darwin

checksums           rmd160  abfceec63bc72b387907f7661268fe2ea5542d35 \
                    sha256  437f65748272de89b8a6990f0f9fca57addf6ff6f8e4de077869976d2ce36154 \
                    size    38479

# Allow Go to fetch dependencies at build time
go.offline_build no
go.toolchain_min    1.24.0

build.pre_args-append \
                    -ldflags \" \
                        -s -w -X main.version=${github.tag_prefix}${version} \
                    \" \
                    -o bin/mp

destroot {
    xinstall -m 755 ${worksrcpath}/bin/mp ${destroot}${prefix}/bin/

    set mp_doc_dir ${prefix}/share/doc/${name}

    xinstall -d -m 755 ${destroot}${mp_doc_dir}
    copy {*}[glob ${worksrcpath}/docs/*] ${destroot}${mp_doc_dir}/
}
