You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-hyperfine/rust-hyperfine.spec

84 lines
2.2 KiB

# Generated by rust2rpm 25
%bcond_without check
%global crate hyperfine
Name: rust-hyperfine
Version: 1.18.0
Release: %autorelease
Summary: Command-line benchmarking tool
License: MIT OR Apache-2.0
URL: https://crates.io/crates/hyperfine
Source: %{crates_source}
# Automatically generated patch to strip dependencies and normalize metadata
Patch: hyperfine-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * relax indicatif dependency from =0.17.4 to ^0.17.4
Patch: hyperfine-fix-metadata.diff
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
A command-line benchmarking tool.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# MIT
# MIT OR Apache-2.0
# MPL-2.0
# Unlicense OR MIT
License: MIT AND MPL-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
# LICENSE.dependencies contains a full license breakdown
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE-APACHE
%license LICENSE-MIT
%license LICENSE.dependencies
%doc CHANGELOG.md
%doc README.md
%{_bindir}/hyperfine
%{_mandir}/man1/hyperfine.1*
%{bash_completions_dir}/hyperfine.bash
%{fish_completions_dir}/hyperfine.fish
%{zsh_completions_dir}/_hyperfine
%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install
# install manpage
install -Dpm 0644 doc/hyperfine.1 -t %{buildroot}/%{_mandir}/man1
# install shell completions
install -Dpm 0644 target/release/build/%{crate}-*/out/hyperfine.bash \
-t %{buildroot}/%{bash_completions_dir}
install -Dpm 0644 target/release/build/%{crate}-*/out/hyperfine.fish \
-t %{buildroot}/%{fish_completions_dir}
install -Dpm 0644 target/release/build/%{crate}-*/out/_hyperfine \
-t %{buildroot}/%{zsh_completions_dir}
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog