Accepting request 1039208 from home:fbonazzi:branches:utilities

- Add shell completion packages
- Install manpage

OBS-URL: https://build.opensuse.org/request/show/1039208
OBS-URL: https://build.opensuse.org/package/show/utilities/bat?expand=0&rev=39
This commit is contained in:
Michael Vetter 2022-12-01 07:59:39 +00:00 committed by Git OBS Bridge
parent 12d9ebcd9a
commit fcb7d6a22a
3 changed files with 55 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 30 22:20:13 UTC 2022 - Filippo Bonazzi <filippo.bonazzi@suse.com>
- Add shell completion packages
- Install manpage
-------------------------------------------------------------------
Fri Oct 14 01:15:46 UTC 2022 - William Brown <william.brown@suse.com>

View File

@ -36,6 +36,33 @@ ExclusiveArch: %{rust_arches}
A cat(1) clone which supports syntax highlighting for a large number of
programming and markup languages. It has git integration and automatic paging.
%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 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}.
%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}.
%prep
%setup -qa1
mkdir .cargo
@ -47,6 +74,12 @@ cp %{SOURCE2} .cargo/config
%install
install -D -m 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 $(find target/release/build -name "%{name}.1") "%{buildroot}/%{_mandir}/man1/%{name}.1"
install -D -m 0644 $(find target/release/build -name "%{name}.bash") "%{buildroot}/%{_datadir}/bash-completion/completions/%{name}"
install -D -m 0644 $(find target/release/build -name "%{name}.fish") "%{buildroot}/%{_datadir}/fish/vendor_completions.d/%{name}.fish"
install -D -m 0644 $(find target/release/build -name "%{name}.zsh") "%{buildroot}/%{_datadir}/zsh/site-functions/_%{name}"
%if %{with check}
%check
%{cargo_test}
@ -56,5 +89,19 @@ install -D -m 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name}
%doc README.md CONTRIBUTING.md CHANGELOG.md
%license LICENSE-MIT LICENSE-APACHE
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{ext_man}
%files bash-completion
%{_datadir}/bash-completion/completions/%{name}
%files fish-completion
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/%{name}.fish
%files zsh-completion
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}
%changelog

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d85270e6b55aafaaf46ebe44551ebcc96841ae522a51710356d7b2c2c2ef48c
size 18414380
oid sha256:7b142fbc3ab44c7ecd5e3cf6b9ffc6ac94979905d5477a1d5f4a68bfd742adc7
size 18598028