From 3b33409348ee00acc92ff9cac9f6ba450d3ef6b5 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Mon, 25 May 2020 17:16:09 +0200 Subject: [PATCH] Add man and shell completions Signed-off-by: Igor Raits --- rust-hyperfine.spec | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/rust-hyperfine.spec b/rust-hyperfine.spec index 99615be..b94191c 100644 --- a/rust-hyperfine.spec +++ b/rust-hyperfine.spec @@ -40,8 +40,18 @@ License: ASL 2.0 and MIT and MPLv2.0 %files -n %{crate} %license LICENSE-MIT LICENSE-APACHE -%doc README.md +%doc README.md CHANGELOG.md %{_bindir}/hyperfine +%{_mandir}/man1/hyperfine.1* +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/hyperfine.bash +%dir %{_datadir}/fish +%dir %{_datadir}/fish/vendor_completions.d +%{_datadir}/fish/vendor_completions.d/hyperfine.fish +%dir %{_datadir}/zsh +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_hyperfine %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 @@ -55,6 +65,14 @@ License: ASL 2.0 and MIT and MPLv2.0 %install %cargo_install +install -Dpm0644 -t %{buildroot}%{_mandir}/man1 \ + doc/hyperfine.1 +install -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions \ + target/release/build/%{crate}-*/out/hyperfine.bash +install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \ + target/release/build/%{crate}-*/out/hyperfine.fish +install -Dpm0644 -t %{buildroot}%{_datadir}/zsh/site-functions \ + target/release/build/%{crate}-*/out/_hyperfine %if %{with check} %check