From 23881defed0d1f6a5fa4c9824249b4c7159dd139 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 15 Oct 2023 11:13:34 +0200 Subject: [PATCH] Initial import (half 1 compat package) --- .gitignore | 1 + README.md | 3 - half-fix-metadata.diff | 16 +++++ rust-half1.spec | 158 +++++++++++++++++++++++++++++++++++++++++ rust2rpm.toml | 3 + sources | 1 + 6 files changed, 179 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 half-fix-metadata.diff create mode 100644 rust-half1.spec create mode 100644 rust2rpm.toml create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..329dfa0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/half-1.8.2.crate diff --git a/README.md b/README.md deleted file mode 100644 index 14cc405..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-half1 - -The rust-half1 package diff --git a/half-fix-metadata.diff b/half-fix-metadata.diff new file mode 100644 index 0000000..dea88dc --- /dev/null +++ b/half-fix-metadata.diff @@ -0,0 +1,16 @@ +--- half-1.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ half-1.8.2/Cargo.toml 2023-10-14T20:42:52.808672+00:00 +@@ -46,13 +46,6 @@ + optional = true + default-features = false + +-[dependencies.zerocopy] +-version = "0.6.0" +-optional = true +-default-features = false +-[dev-dependencies.criterion] +-version = "0.3.5" +- + [dev-dependencies.quickcheck] + version = "1.0" + diff --git a/rust-half1.spec b/rust-half1.spec new file mode 100644 index 0000000..4730114 --- /dev/null +++ b/rust-half1.spec @@ -0,0 +1,158 @@ +# Generated by rust2rpm 25 +%bcond_without check +%global debug_package %{nil} + +%global crate half + +Name: rust-half1 +Version: 1.8.2 +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} +# Manually created patch for downstream crate metadata changes +# * drop unused zerocopy feature (missing dependencies) +# * drop unused benchmark-only criterion dependency +Patch: half-fix-metadata.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Half-precision floating point f16 and bf16 types for Rust implementing +the IEEE 754-2008 standard binary16 and bfloat16 types.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+bytemuck-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bytemuck-devel %{_description} + +This package contains library source intended for building other packages which +use the "bytemuck" feature of the "%{crate}" crate. + +%files -n %{name}+bytemuck-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+num-traits-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+num-traits-devel %{_description} + +This package contains library source intended for building other packages which +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 +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde" feature of the "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+serialize-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serialize-devel %{_description} + +This package contains library source intended for building other packages which +use the "serialize" feature of the "%{crate}" crate. + +%files -n %{name}+serialize-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+use-intrinsics-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+use-intrinsics-devel %{_description} + +This package contains library source intended for building other packages which +use the "use-intrinsics" feature of the "%{crate}" crate. + +%files -n %{name}+use-intrinsics-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog 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 new file mode 100644 index 0000000..05bdbed --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (half-1.8.2.crate) = 5eb128e41b8b7f9769a669834b2f8380b115395bf2a2a181732bf6c71234d978dbc4c527fddadaa7bd7fae9add77958b27616bfa1767fd123d3cfb887663292e