# -*- 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/git-chglog/git-chglog 0.15.4 v
# Delete this on next update to use golang PortGroup's default ('archive')
github.tarball_from tarball
revision            0

categories          sysutils
license             MIT
maintainers         {judaew @judaew} openmaintainer
description         git CHANGELOG generator
long_description    ${description}. Anytime, anywhere, Write your CHANGELOG

checksums           rmd160  14edb3ac72ec1664d0d4c303beb4f828a5ccbc00 \
                    sha256  e0e17848ca5f8b79c75432035e898f12497f020fdf5485d73ad6d551cf670198 \
                    size    550943

# FIXME: This port currently can't be built without allowing go mod to fetch
go.offline_build no

build.pre_args-append \
    -ldflags \"-X main.version=v${version} -X main.buildBy=macports\"
build.args          ./cmd/${name}

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

test.run            yes
test.args           -v
