# -*- 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           github 1.0
PortGroup           golang 1.0

name                containerbuild
go.setup            github.com/TecharoHQ/anubis 1.28.2 v
github.tarball_from releases
revision            0

categories          devel
license             MIT
maintainers         @wu21-web openmaintainer
description         Container image build helper for Anubis
long_description    containerbuild builds Anubis container images using ko \
                    from an Anubis Git checkout, with support for image tags, \
                    labels, annotations, and GitHub Actions outputs.
homepage            https://anubis.techaro.lol/

depends_run-append  bin:git:git \
                    port:ko

distname            anubis-src-vendor-npm-${version}
checksums           rmd160  ebe5014872052ceca6899074758f57231b3f0a53 \
                    sha256  524faa5da63fe45ccc8f070cd8bb12c2ac98599ed4832a17b42c2d09c19c66c2 \
                    size    26498890

build.env-delete    GO111MODULE=off
build.env-append    GO111MODULE=on \
                    GOTOOLCHAIN=local
build.args          -mod=vendor \
                    -trimpath \
                    -o ${name} \
                    ./cmd/containerbuild

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 ${worksrcpath}/LICENSE \
        ${destroot}${prefix}/share/doc/${name}/
}
