# -*- 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/danvergara/dblab 0.51.0 v
go.toolchain_min    1.26
revision            0

description         Interactive client for PostgreSQL and MySQL

long_description    \
    dblab is a fast and lightweight interactive terminal based UI application \
    for PostgreSQL and MySQL, written in Go and works on OSX, Linux and \
    Windows machines.  dblab was created as an attempt to build very simple \
    and portable application to work with local or remote PostgreSQL/MySQL \
    databases.

categories          databases
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  061899d7de5ce892aae8ec4b8696df9f3cb3dd44 \
                    sha256  f5392eda82c747f2bcdf01eb465a437c30f6f4aa5fb709f291a6d3414ddcce01 \
                    size    4245877

# Allow Go to fetch deps at build time
go.offline_build no

# The Makefile's build target only wraps go build and passes no ldflags, so
# build directly and stamp the version, which otherwise reports "unknown".
build.env-append    CGO_ENABLED=0
build.args-append   -ldflags \"-X main.version=${version}\" -o ${name} .

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

github.livecheck.regex  {([0-9.]+)}
