# -*- 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/ariga/atlas 1.3.0 v
go.package          ariga.io/atlas
go.toolchain_min    1.26.4
go.offline_build    no
name                atlas-toolkit
revision            0

homepage            https://atlasgo.io

description         \
    A database toolkit that helps developers apply modern DevOps principles.

long_description    \
    Atlas CLI is an open source tool that helps developers manage their \
    database schemas by applying modern DevOps principles. Contrary to \
    existing tools, Atlas intelligently plans schema migrations for you. \
    Atlas users can use the Atlas DDL (data definition language) to describe \
    their desired database schema and use the command-line tool to plan and \
    apply the migrations to their systems.

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

checksums           rmd160  154e0e7db492d20c8008db5ae452484ced78b08b \
                    sha256  4d83772262864d35f8490d919eb405aa47c44d5b703496494b3141c691ed8987 \
                    size    786394

build.dir           ${worksrcpath}/cmd/atlas
build.cmd           "${go.bin} generate ./... && ${go.bin} build"

# Upstream expects the version by build flag; without it atlas reports
# "development". The value has to be valid semver, so keep the v.
build.args-append   -ldflags \"-X ${go.package}/cmd/atlas/internal/cmdapi.version=${github.tag_prefix}${version}\"

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