diff --git a/.gitignore b/.gitignore index 9223faa..a1aeb3f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /half-1.6.0.crate /half-1.7.1.crate /half-1.8.2.crate +/half-2.3.1.crate diff --git a/half-fix-metadata-auto.diff b/half-fix-metadata-auto.diff new file mode 100644 index 0000000..94af787 --- /dev/null +++ b/half-fix-metadata-auto.diff @@ -0,0 +1,8 @@ +--- half-2.3.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ half-2.3.1/Cargo.toml 2023-10-14T20:41:06.915241+00:00 +@@ -107,5 +107,3 @@ + std = ["alloc"] + use-intrinsics = [] + +-[target."cfg(target_arch = \"spirv\")".dependencies.crunchy] +-version = "0.2.2" diff --git a/half-fix-metadata.diff b/half-fix-metadata.diff index 5cca1a6..0aa8c90 100644 --- a/half-fix-metadata.diff +++ b/half-fix-metadata.diff @@ -1,6 +1,6 @@ ---- half-1.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ half-1.8.2/Cargo.toml 2023-06-07T20:10:17.220037+00:00 -@@ -46,13 +46,6 @@ +--- half-2.3.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ half-2.3.1/Cargo.toml 2023-10-14T20:41:18.538289+00:00 +@@ -77,14 +77,6 @@ optional = true default-features = false @@ -8,9 +8,10 @@ -version = "0.6.0" -optional = true -default-features = false +- -[dev-dependencies.criterion] --version = "0.3.5" +-version = "0.4.0" - - [dev-dependencies.quickcheck] - version = "1.0" + [dev-dependencies.crunchy] + version = "0.2.2" diff --git a/rust-half.spec b/rust-half.spec index b2a0aa4..2fa0271 100644 --- a/rust-half.spec +++ b/rust-half.spec @@ -1,23 +1,25 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 25 %bcond_without check %global debug_package %{nil} %global crate half Name: rust-half -Version: 1.8.2 +Version: 2.3.1 Release: %autorelease Summary: Half-precision floating point f16 and bf16 types for Rust License: MIT OR Apache-2.0 URL: https://crates.io/crates/half Source: %{crates_source} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: half-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * drop unused zerocopy feature (missing dependencies) -# * drop unused benchmark-only criterion dependency to speed up builds +# * drop unused benchmark-only criterion dependency Patch: half-fix-metadata.diff -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Half-precision floating point f16 and bf16 types for Rust implementing @@ -88,28 +90,28 @@ use the "num-traits" feature of the "%{crate}" crate. %files -n %{name}+num-traits-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+serde-devel +%package -n %{name}+rand_distr-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+serde-devel %{_description} +%description -n %{name}+rand_distr-devel %{_description} This package contains library source intended for building other packages which -use the "serde" feature of the "%{crate}" crate. +use the "rand_distr" feature of the "%{crate}" crate. -%files -n %{name}+serde-devel +%files -n %{name}+rand_distr-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+serialize-devel +%package -n %{name}+serde-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+serialize-devel %{_description} +%description -n %{name}+serde-devel %{_description} This package contains library source intended for building other packages which -use the "serialize" feature of the "%{crate}" crate. +use the "serde" feature of the "%{crate}" crate. -%files -n %{name}+serialize-devel +%files -n %{name}+serde-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+std-devel @@ -137,7 +139,7 @@ use the "use-intrinsics" feature of the "%{crate}" crate. %ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires diff --git a/rust2rpm.conf b/rust2rpm.conf deleted file mode 100644 index 54157da..0000000 --- a/rust2rpm.conf +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -summary = Half-precision floating point f16 and bf16 types for Rust diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..ba29a5a --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,3 @@ +[package] +summary = "Half-precision floating point f16 and bf16 types for Rust" + diff --git a/sources b/sources index 05bdbed..373dc39 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (half-1.8.2.crate) = 5eb128e41b8b7f9769a669834b2f8380b115395bf2a2a181732bf6c71234d978dbc4c527fddadaa7bd7fae9add77958b27616bfa1767fd123d3cfb887663292e +SHA512 (half-2.3.1.crate) = b29acbca7b8f8fed6392346d03c710dad0f51cb2e358e7ea74a3aad4e10ffd22edb4154a56f877adc375da831a7597b51f7049335c0781a1b1110103e5eafc35