# -*- 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.34 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  0d992f50cc11560f7c4016ead9559db44c0b1210 \
                    sha256  289b3df07b3847fecb0d815ff552dad1b1b1e4f662eddc898ca7b1e7d81d6d7c \
                    size    57756

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

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