commit:     2fdf97bcd0df65ecf59efdb0b435b5e899bbe4e5
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 28 10:24:28 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 28 10:26:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fdf97bc

app-misc/go-jira: EAPI=8, fix gen shell-completion, fix license

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-misc/go-jira/go-jira-1.0.28-r1.ebuild | 45 +++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/app-misc/go-jira/go-jira-1.0.28-r1.ebuild 
b/app-misc/go-jira/go-jira-1.0.28-r1.ebuild
new file mode 100644
index 000000000000..20d8f277a9f8
--- /dev/null
+++ b/app-misc/go-jira/go-jira-1.0.28-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module shell-completion toolchain-funcs
+
+DESCRIPTION="A simple JIRA commandline client in Go"
+HOMEPAGE="https://github.com/go-jira/jira";
+SRC_URI="https://github.com/go-jira/jira/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz";
+S=${WORKDIR}/jira-${PV}
+
+LICENSE="Apache-2.0"
+# Dependent licenses
+LICENSE+=" BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_compile() {
+       ego build -o jira ./cmd/jira
+
+       if ! tc-is-cross-compiler; then
+               elog "generating shell completion files"
+               # those commands exit OK with 1, so we can't use die
+
+               ./jira --completion-script-bash > jira.bash
+               grep -q "complete -F" jira.bash || die "bash completion script 
is invalid"
+
+               ./jira --completion-script-zsh > jira.zsh
+               grep -q "compdef jira" jira.zsh || die "zsh completion script 
is invalid"
+       fi
+}
+
+src_install() {
+       dobin jira
+       dodoc {CHANGELOG,README}.md
+
+       if ! tc-is-cross-compiler; then
+               newbashcomp jira.bash jira
+               newzshcomp jira.zsh _jira
+       else
+               ewarn "Shell completion files not installed!"
+       fi
+}

Reply via email to