# -*- 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/brimdata/zed 1.18.0 v
go.offline_build    no
github.tarball_from archive
revision            0

subport zq {}

homepage            https://zed.brimdata.io

description         \
    Tooling for super-structured data: a new and easier way to manipulate data

long_description    \
    {*}${description}. Zed offers a new approach to data that makes \
    it easier to manipulate and manage your data. With Zed's new \
    super-structured data model, messy JSON data can easily be given the \
    fully-typed precision of relational tables without giving up JSON's \
    uncanny ability to represent eclectic data.

categories          textproc devel
installs_libs       no
license             BSD
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  bf4b784a6ca79afca60796298760bfbe6633e70b \
                    sha256  ad26518d589f565a3859177066a2ad08f067910fa204a51436a55af837198175 \
                    size    6218528

build.cmd           make
build.pre_args-append \
                    VERSION=${github.tag_prefix}${version}
build.args          build

patch {
    reinplace -E {s|VERSION =|VERSION ?=|} ${worksrcpath}/Makefile
}

if {${subport} eq ${name}} {
    destroot {
        foreach zbin {zed zc} {
            xinstall -m 0755 \
                ${worksrcpath}/dist/${zbin} ${destroot}${prefix}/bin/
        }
    }
} else {
    destroot {
        xinstall -m 0755 ${worksrcpath}/dist/zq ${destroot}${prefix}/bin/
    }
}
