# -*- 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 v1.8.1
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  9991ab18e4fb54b0e61a7c9c2f5cb8bc2ffe5779 \
                    sha256  e7c50fded0e036ef56d2479a2fee1eba35ea7fd232a4ba7c98ab087e4ae521ed \
                    size    4898941

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