commit:     0159744a8aba62daaa0f5525b7434437f22f8f42
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 26 19:47:12 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 26 19:48:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0159744a

app-containers/kompose: add 1.35.0, enable tests, EAPI=8

- EAPI=8
- add dependent licenses
- generate shell completions if not in cross
- enable tests (they pass for me, and upstream. If not, ping me, we can
  do another test by calling covert on the example in repo)

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

 app-containers/kompose/Manifest              |  2 ++
 app-containers/kompose/kompose-1.35.0.ebuild | 51 ++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/app-containers/kompose/Manifest b/app-containers/kompose/Manifest
index 99c79998b3d1..d79159a45935 100644
--- a/app-containers/kompose/Manifest
+++ b/app-containers/kompose/Manifest
@@ -1,2 +1,4 @@
 DIST kompose-1.26.1-deps.tar.xz 177960392 BLAKE2B 
cf9074a64493c8280d2cf4e6c737100338ee049231abc45f3b80665ef864a49cb269285785facb82897c12f09c8f48564a28f180c195dc016f5f54db2989c8f9
 SHA512 
acba18bedae36e321012993c1e297c9bf59d732d561c72a0eadbd10d5aadbb838e38d3f7c9bd0086157874b58af8cca9ed67587cd931bed0831884b4d7688994
 DIST kompose-1.26.1.tar.gz 434463 BLAKE2B 
e4cc000723a34d46d39f6222864960c184e72ea8f30eac858a67e1664359676f103775790cdcf3faac798110a6ba5ff5f029a1213b54691abfef965be4ddfe94
 SHA512 
d9d181b12908298c11d99b9dda6f5e48b0bf44fca84836a7397bc726746f8d1a615a7b26aa90ea64a0fd90c50ddceae6c325d0c9d8c0c14840fc5828cefe8c23
+DIST kompose-1.35.0-deps.tar.xz 48368152 BLAKE2B 
1432b4085b945ba47c13dafcfcfafa5fc47b367cf75910d8c9c8ec79379d7ab730fcc53711f196f6dd57b11a8df4b53aa0c5d2e53fdce654d3aa061658fbc5a3
 SHA512 
abe32489d1d7c1e49986bca530cc9dfdfcd26493abfbe5e8ee71db3586d20af236629ab82a5a64cd0dc6fb99d799227a3dc6ec84dd0c91c5bcac7a2fccf56ac5
+DIST kompose-1.35.0.tar.gz 17992643 BLAKE2B 
5220a4a553addc05a027da936e6e2f1c03629a1dee05c8703534a4cdb0db98a8e435e23d34dfe4b57383c57af8cda3e37140a01da053b017a10391ddc9c7d3de
 SHA512 
023e4e5b328e69efee5ac5de4dde44652f57f5a17cf6158283dda218a5e8ed43368cb7fb08cea75655f2a04e6be0cfcc017ad8293c9eee2ad38721d2985893f2

diff --git a/app-containers/kompose/kompose-1.35.0.ebuild 
b/app-containers/kompose/kompose-1.35.0.ebuild
new file mode 100644
index 000000000000..3ba88af24596
--- /dev/null
+++ b/app-containers/kompose/kompose-1.35.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module toolchain-funcs shell-completion
+
+GIT_COMMIT=9532ceef
+
+DESCRIPTION="Tool to move from docker-compose to Kubernetes"
+HOMEPAGE="https://github.com/kubernetes/kompose https://kompose.io";
+SRC_URI="https://github.com/kubernetes/kompose/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" 
https://dev.gentoo.org/~arthurzam/distfiles/app-containers/${PN}/${P}-deps.tar.xz";
+
+LICENSE="Apache-2.0"
+# Dependent licenses
+LICENSE+=" BSD BSD-2 MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_compile() {
+       local -x CGO_ENABLED=0
+       local myegoargs=(
+               -ldflags="-X 
github.com/kubernetes/kompose/pkg/version.GITCOMMIT=${GIT_COMMIT}"
+       )
+       ego build "${myegoargs[@]}" -o ${PN} main.go
+
+       if ! tc-is-cross-compiler; then
+               elog "generating shell completion files"
+               ./kompose completion bash > ${PN}.bash || die
+               ./kompose completion zsh > ${PN}.zsh || die
+               ./kompose completion fish > ${PN}.fish || die
+       fi
+}
+
+src_test() {
+       ego test -v ./...
+}
+
+src_install() {
+       dobin ${PN}
+       dodoc -r docs README.md
+
+       if ! tc-is-cross-compiler; then
+               newbashcomp ${PN}.bash ${PN}
+               newzshcomp ${PN}.zsh _${PN}
+               dofishcomp ${PN}.fish
+       else
+               ewarn "Shell completion files not installed! Install them 
manually with '${PN} completion --help'"
+       fi
+}

Reply via email to