diff --git a/anda/rust/hyperfine/anda.hcl b/anda/rust/hyperfine/anda.hcl new file mode 100644 index 0000000000..8ebddb2ab8 --- /dev/null +++ b/anda/rust/hyperfine/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-hyperfine.spec" + } +} diff --git a/anda/rust/hyperfine/hyperfine-fix-metadata-auto.diff b/anda/rust/hyperfine/hyperfine-fix-metadata-auto.diff new file mode 100644 index 0000000000..7f96e53798 --- /dev/null +++ b/anda/rust/hyperfine/hyperfine-fix-metadata-auto.diff @@ -0,0 +1,25 @@ +--- hyperfine-1.15.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ hyperfine-1.15.0/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -96,9 +96,6 @@ + [features] + windows_process_extensions_main_thread_handle = [] + +-[target."cfg(all(windows, not(windows_process_extensions_main_thread_handle)))".dependencies.once_cell] +-version = "1.14" +- + [target."cfg(not(windows))".dependencies.libc] + version = "0.2" + +@@ -106,12 +103,3 @@ + version = "0.25.0" + features = ["zerocopy"] + +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = [ +- "processthreadsapi", +- "minwindef", +- "winnt", +- "jobapi2", +- "tlhelp32", +-] diff --git a/anda/rust/hyperfine/rust-hyperfine.spec b/anda/rust/hyperfine/rust-hyperfine.spec new file mode 100644 index 0000000000..5098115277 --- /dev/null +++ b/anda/rust/hyperfine/rust-hyperfine.spec @@ -0,0 +1,53 @@ +# Generated by rust2rpm 23 +%bcond_without check + +%global crate hyperfine + +Name: rust-hyperfine +Version: 1.15.0 +Release: %autorelease +Summary: Command-line benchmarking tool + +# Upstream license specification: MIT/Apache-2.0 +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/hyperfine +Source: %{crates_source} +# Automatically generated patch to strip foreign dependencies +Patch: hyperfine-fix-metadata-auto.diff + +BuildRequires: anda-srpm-macros rust-packaging >= 21 + +%global _description %{expand: +Command-line benchmarking tool.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE-APACHE +%license LICENSE-MIT +%doc CHANGELOG.md +%doc README.md +%{_bindir}/hyperfine + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep_online + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/anda/rust/hyperfine/update.rhai b/anda/rust/hyperfine/update.rhai new file mode 100644 index 0000000000..5942d0c4db --- /dev/null +++ b/anda/rust/hyperfine/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("hyperfine"));