File kind.spec of Package kind
#
# spec file for package kind
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: kind
Version: 0.23.0
Release: 0
Summary: Kubernetes IN Docker - local clusters for testing Kubernetes
License: Apache-2.0
URL: https://github.com/kubernetes-sigs/%{name}
Source: %{name}-%{version}
ExclusiveArch: x86_64
%description
kind is a tool for running local Kubernetes clusters using Docker container "nodes". kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.
%package bash-completion
Summary: Fish completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Requires: bash-completion
BuildArch: noarch
Supplements: (%{name} and bash-completion)
%description bash-completion
Bash command line completion support for %{name}.
%package zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Requires: zsh
BuildRequires: zsh
Supplements: (%{name} and zsh)
BuildArch: noarch
%description zsh-completion
Zsh command line completion support for %{name}.
%package fish-completion
Summary: Fish completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Requires: fish
BuildRequires: fish
Supplements: (%{name} and fish)
BuildArch: noarch
%description fish-completion
Fish command line completion support for %{name}.
%prep
%build
%install
install -d %{buildroot}%{_bindir}
install -m 755 -s %{SOURCE0} %{buildroot}%{_bindir}/%{name}
install -d %{buildroot}%{_datadir}/bash-completion/completions
%{buildroot}%{_bindir}/%{name} completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{name}
install -d %{buildroot}/%{_sysconfdir}/zsh_completion.d
%{buildroot}%{_bindir}/%{name} completion zsh > %{buildroot}%{_sysconfdir}/zsh_completion.d/_%{name}
install -d %{buildroot}%{_datadir}/fish/vendor_completions.d
%{buildroot}%{_bindir}/%{name} completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
%files
%{_bindir}/%{name}
%files bash-completion
%defattr(-,root,root)
%{_datarootdir}/bash-completion/completions/%{name}
%files zsh-completion
%defattr(-,root,root)
%{_sysconfdir}/zsh_completion.d/_%{name}
%files fish-completion
%defattr(-,root,root)
%{_datadir}/fish/vendor_completions.d/%{name}.fish
%changelog