# -*- 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.48.1 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  e5715d639da21eb6096a30ec3687b3676748814a \
                    sha256  6efe167744fafaa12bda5e910d256aff834068e7bd46ef931f19391c6765f45c \
                    size    3963924

# 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.]+)}
