# -*- 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 3.0.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  b2d85aa2c21c9bc5d554bb1a7828c8ce26ba6cd3 \
                    sha256  987931434d0fe2b5bdc4fc4c630a7c2f2f05ca51d1245f5c269c139a9e9e296c \
                    size    1193386

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

set binname         cfv
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/
}
