# -*- 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/ankitpokhrel/jira-cli 1.7.0 v
revision            0

description         Feature-rich interactive Jira command line

long_description    \
    Jira-Cli is an interactive command line tool for Atlassian Jira that will \
    help you avoid Jira UI to some extent. This tool is not yet considered \
    complete but has all the essential features required to improve your \
    workflow with Jira.

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

checksums           rmd160  863cd601ca71528e36cdcde3a787f0df72742ce4 \
                    sha256  6b1ecbd2228626cdc987548d8d83faae074c7a167cef737a9ac9180a03767154 \
                    size    53299162

# Allow Go to fetch dependencies at build-time
go.offline_build no

build.cmd           make
build.pre_args      GIT_COMMIT=archive \
                    SOURCE_DATE_EPOCH="-1" \
                    VERSION=${version}
build.args          build

patch {
    reinplace {s|go build|go build -o ./bin/|g} ${worksrcpath}/Makefile
}

pre-build {
    file mkdir ${worksrcpath}/bin
}

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

notes "
    ${name} has been installed as `jira`
"
