# -*- 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/Boeing/config-file-validator 1.9.0 v
categories          sysutils textproc
maintainers         {i0ntempest @i0ntempest} openmaintainer
license             Apache-2

description         tool to validate configuration files
long_description    ${name} is a cross-platform CLI tool to validate different configuration file types,\
                    including plist, ini, json, xml, yaml, toml, and more.

checksums           rmd160  bbf6887ec15276ce9735b12684e83b50b2efa360 \
                    sha256  373e66f60ef03026f7efa3116fc5d64c04a6b7e88ea081d66eab8d69957293d4 \
                    size    4903511

# Needs multiple versions of github.com/apparentlymart/go-textseg
go.offline_build    no

set binname         [lindex [split ${name} -] [llength [split ${name} -]]-1]
build.env-append    CGO_ENABLED=0
build.post_args     -ldflags=\"-s -w -X 'github.com/Boeing/config-file-validator.version=${version}'\" -o ./${binname} ./cmd/${binname}

destroot {
    xinstall -m 0755 ${worksrcpath}/${binname} ${destroot}${prefix}/bin/
}
