# -*- 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/go-task/task 3.44.1 v
go.offline_build    no
name                go-task
revision            0

homepage            https://taskfile.dev

description         A task runner / simpler Make alternative written in Go

long_description    Task is a task runner / build tool that aims to be simpler \
                    and easier to use than, for example, GNU Make.

conflicts           task

categories          devel
installs_libs       no
license             MIT
maintainers         {@0xIDANT danieltrautmann.com:me} \
                    {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  3dbea1c1f714957767a621fdfbc9baca9f7734e5 \
                    sha256  d395eb802cca3f3f4b90e4bf504b6bc01f676f466d0bfb9e5045457bc085f516 \
                    size    565333 \

build.env-append    CGO_ENABLED=0
build.args          -o ${worksrcpath}/task \
                    -ldflags \" \
                        -s \
                        -w \
                        -X ${go.package}/internal/version.version=${version} \
                    \" \
                    ./cmd/task

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

    # Install bash completion
    xinstall -d  ${destroot}${prefix}/share/bash-completion/completions
    xinstall ${worksrcpath}/completion/bash/task.bash \
        ${destroot}${prefix}/share/bash-completion/completions/task

    # Install fish completion
    xinstall -d ${destroot}${prefix}/share/fish/vendor_completions.d
    xinstall ${worksrcpath}/completion/fish/task.fish \
        ${destroot}${prefix}/share/fish/vendor_completions.d/

    # Install zsh completion
    xinstall -d  ${destroot}${prefix}/share/zsh/site-functions
    xinstall ${worksrcpath}/completion/zsh/_task \
        ${destroot}${prefix}/share/zsh/site-functions/
}
