%global debug_package %{nil} Name: hyperfine Version: 1.15.0 Release: 1%{?dist} Summary: A command-line benchmarking tool License: MIT URL: https://github.com/sharkdp/hyperfine Source: %{url}/archive/v%{version}.tar.gz BuildRequires: gcc pkg-config %description A command-line benchmarking tool %prep %autosetup -n %{name}-%{version} # install rust if [ ! -d $HOME/.cargo ]; then curl https://sh.rustup.rs -sSf | sh -s -- -y fi %build $HOME/.cargo/bin/cargo build --release %install install -pDm755 target/release/%{name} %{buildroot}%{_bindir}/%{name} install -pDm644 target/release/build/hyperfine-*/out/hyperfine.bash %{buildroot}/usr/share/bash-completion/completions/hyperfine install -pDm644 target/release/build/hyperfine-*/out/hyperfine.fish %{buildroot}/usr/share/fish/vendor_completions.d/hyperfine.fish install -pDm644 target/release/build/hyperfine-*/out/_hyperfine %{buildroot}/usr/share/zsh/site-functions/_hyperfine install -pDm644 doc/hyperfine.1 %{buildroot}%{_mandir}/man1/hyperfine.1.gz %check %files %{_bindir}/%{name} %{_mandir}/man1/hyperfine.1.gz %{_datadir}/bash-completion/completions/hyperfine %{_datadir}/fish/vendor_completions.d/hyperfine.fish %{_datadir}/zsh/site-functions/_hyperfine %changelog