From f7c2ec0bae909a948044c01803f251f8cc0062d65b314898114a2cb8a4bd3a1b Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Mon, 31 Jan 2022 11:16:23 +0000 Subject: [PATCH] Accepting request 949538 from home:robert_munteanu:branches:devel:kubic Added completion packages OBS-URL: https://build.opensuse.org/request/show/949538 OBS-URL: https://build.opensuse.org/package/show/devel:kubic/velero?expand=0&rev=24 --- velero.changes | 5 +++++ velero.spec | 51 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/velero.changes b/velero.changes index 13af6c0..3851b96 100644 --- a/velero.changes +++ b/velero.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 27 22:48:11 UTC 2022 - Robert Munteanu + +- Added completion packages + ------------------------------------------------------------------- Fri Dec 10 02:04:03 UTC 2021 - jenting.hsiao@suse.com diff --git a/velero.spec b/velero.spec index db19007..c90b4b9 100644 --- a/velero.spec +++ b/velero.spec @@ -1,7 +1,7 @@ # # spec file for package velero # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -45,6 +45,33 @@ Supplements: packageand(velero:velero-restic-restore-helper) %description velero-restic-restore-helper Restic restore helper for %{name}. +%package bash-completion +Summary: Bash Completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and bash-completion) +BuildArch: noarch + +%description bash-completion +Bash command line completion support for %{name}. + +%package zsh-completion +Summary: Zsh Completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and zsh) +BuildArch: noarch + +%description zsh-completion +Zsh command line completion support for %{name}. + +%package fish-completion +Summary: Fish Completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and fish) +BuildArch: noarch + +%description fish-completion +Fish command line completion support for %{name}. + %prep %setup -q -a1 @@ -56,6 +83,12 @@ export CGO_ENABLED=0 %install %goinstall +mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions +%{buildroot}/%{_bindir}/%{name} completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{name} +mkdir -p %{buildroot}%{_datarootdir}/zsh_completion.d +%{buildroot}/%{_bindir}/%{name} completion zsh > %{buildroot}%{_datarootdir}/zsh_completion.d/_%{name} +mkdir -p %{buildroot}%{_datadir}/fish/vendor_completions.d +%{buildroot}/%{_bindir}/%{name} completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name}.fish %files %doc README.md @@ -63,4 +96,20 @@ export CGO_ENABLED=0 %{_bindir}/velero %{_bindir}/velero-restic-restore-helper +%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} + +%files fish-completion +%defattr(-,root,root) +%dir %{_datarootdir}/fish +%dir %{_datarootdir}/fish/vendor_completions.d +%{_datarootdir}/fish/vendor_completions.d/%{name}.fish + %changelog