# -*- 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/docker/compose 2.32.1 v
# Delete this on next update to use golang PortGroup's default ('archive')
github.tarball_from tarball
revision            0
name                docker-compose-plugin
categories          devel
license             Apache-2
maintainers         {danchr @danchr} \
                    openmaintainer
description         Define and run multi-container applications with Docker
long_description    A tool for running multi-container applications on \
                    Docker defined using the Compose file format. A \
                    Compose file is used to define how one or more \
                    containers that make up your application are \
                    configured. Once you have a Compose file, you can \
                    create and start your application with a single \
                    command: docker compose up.

checksums           rmd160  6111331e38acb33a35f382ba7cb41f3faf286f74 \
                    sha256  22c3cfb1a61e455d4c1931389c21821a91d40233ba10d3255cd5b023ac24a7ff \
                    size    381849

go.offline_build    no

build.target         -o ${name} ./cmd

depends_run         port:docker

post-patch {
    reinplace "/Version *=/s/\"\[^\"]*\"/\"${go.version}\"/" \
        ${worksrcpath}/internal/variables.go
 }

destroot {
    xinstall -d ${destroot}${prefix}/libexec/docker/cli-plugins
    xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/libexec/docker/cli-plugins/docker-compose
}

github.livecheck.regex  {([^"r]+)}