From b34c067e23b0dd98f5ccf3696c2b74c5c2008a3dc9bf9f5d9ed63ba6685cfd5e Mon Sep 17 00:00:00 2001 From: Manfred Hollstein Date: Mon, 23 Nov 2020 19:01:13 +0000 Subject: [PATCH] Accepting request 850302 from home:manfred-h:Cubic - Add bash and zsh completion sub-packages OBS-URL: https://build.opensuse.org/request/show/850302 OBS-URL: https://build.opensuse.org/package/show/devel:kubic/helmfile?expand=0&rev=29 --- helmfile.changes | 5 +++++ helmfile.spec | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/helmfile.changes b/helmfile.changes index 11f6e7d..0fc6d76 100644 --- a/helmfile.changes +++ b/helmfile.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 23 10:17:01 UTC 2020 - Manfred Hollstein + +- Add bash and zsh completion sub-packages + ------------------------------------------------------------------- Thu Nov 19 09:42:48 UTC 2020 - Manfred Hollstein diff --git a/helmfile.spec b/helmfile.spec index 2aa2f21..ec0b55b 100644 --- a/helmfile.spec +++ b/helmfile.spec @@ -43,6 +43,26 @@ Helmfile is a declarative spec for deploying helm charts. It lets you... To avoid upgrades for each iteration of helm, the helmfile executable delegates to helm - as a result, helm must be installed. +%package bash-completion +Summary: Bash Completion for %{name} +Group: System/Shells +Requires: %{name} = %{version} +Supplements: packageand(%{name}:bash-completion) +BuildArch: noarch + +%description bash-completion +Bash command line completion support for %{name}. + +%package zsh-completion +Summary: Zsh Completion for %{name} +Group: System/Shells +Requires: %{name} = %{version} +Supplements: packageand(%{name}:zsh) +BuildArch: noarch + +%description zsh-completion +Zsh command line completion support for %{name}. + %prep %setup -qa1 @@ -53,10 +73,26 @@ go build -mod=vendor -buildmode=pie make TAG=v%{version} install mkdir -p %{buildroot}%{_bindir} install -m755 ${HOME}/go/bin/helmfile %{buildroot}/%{_bindir}/helmfile +mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions +install -m644 autocomplete/helmfile_bash_autocomplete \ + %{buildroot}%{_datarootdir}/bash-completion/completions/%{name} +mkdir -p %{buildroot}%{_datarootdir}/zsh_completion.d +install -m644 autocomplete/helmfile_zsh_autocomplete \ + %{buildroot}%{_datarootdir}/zsh_completion.d/_%{name} %files %doc README.md %license LICENSE %{_bindir}/helmfile +%files bash-completion +%defattr(-,root,root) +%dir %{_datarootdir}/bash-completion/completions/ +%{_datarootdir}/bash-completion/completions/%{name} + +%files zsh-completion +%defattr(-,root,root) +%dir %{_datarootdir}/zsh_completion.d/ +%{_datarootdir}/zsh_completion.d/_%{name} + %changelog