# -*- 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 5.5.1 v
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  0f1e0c6b69c8dc8748a05b6023a4c220f9eb7bc0 \
                    sha256  311077662698fd8e34769a894f9d5240befb1730990efa8ed58e0fa8725d2d84 \
                    size    601526

go.offline_build    no

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

depends_run         port:docker port:docker-buildx-plugin

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