# -*- 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/okfcli/okf 0.4.0 v
go.toolchain_min    1.27
revision            0

description         Vendor-neutral CLI for the Open Knowledge Format

long_description    {*}${description}. ${name} creates, validates, lints, \
                    indexes, searches and graphs OKF bundles, which record \
                    machine-readable knowledge as Markdown with YAML \
                    frontmatter.

categories          textproc
installs_libs       no
license             Apache-2
maintainers         @jrjsmrtn openmaintainer

checksums           ${distname}${extract.suffix} \
                    rmd160  aa8e89b28b4eddaa504bb28bb09910ef0a4623a8 \
                    sha256  8bc65074db3e195e8627032e2df9244b798d162d300e2472bfb815dd84894eb0 \
                    size    59184

# The main package lives in cmd/, not at the repository root. The version is
# injected the way upstream's Makefile does; commit and date are left at their
# in-source defaults, since a tarball carries no git metadata and a build
# timestamp would make the result unreproducible.
build.args          -trimpath \
                    -ldflags \"-s -w -X main.version=${version}\" \
                    ./cmd/${name}

go.vendors          gopkg.in/yaml.v3 \
                        lock    v3.0.1 \
                        rmd160  e85ac1368fb7f9ef945b7fd7bd608a1f0d261c12 \
                        sha256  f3ea6be3f405ec25f8799773355aba54f8831d11f5315a01155bdc69b92eca7b \
                        size    91208

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