From af1f92f943b5f3ce155362bcac346a26e34ee55b Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 5 Jul 2023 19:03:46 +0200 Subject: [PATCH] Initial import (fastrand 1 compat package) --- .gitignore | 1 + README.md | 3 -- fastrand-fix-metadata-auto.diff | 19 +++++++++ rust-fastrand1.spec | 73 +++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 fastrand-fix-metadata-auto.diff create mode 100644 rust-fastrand1.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8347d5e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/fastrand-1.9.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index a6117ed..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-fastrand1 - -The rust-fastrand1 package diff --git a/fastrand-fix-metadata-auto.diff b/fastrand-fix-metadata-auto.diff new file mode 100644 index 0000000..5b03034 --- /dev/null +++ b/fastrand-fix-metadata-auto.diff @@ -0,0 +1,19 @@ +--- fastrand-1.9.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ fastrand-1.9.0/Cargo.toml 2023-07-03T15:59:53.496218+00:00 +@@ -38,16 +38,3 @@ + [dev-dependencies.wyhash] + version = "0.5" + +-[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))".dependencies.instant] +-version = "0.1" +- +-[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))".dev-dependencies.getrandom] +-version = "0.2" +-features = ["js"] +- +-[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))".dev-dependencies.instant] +-version = "0.1" +-features = ["wasm-bindgen"] +- +-[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))".dev-dependencies.wasm-bindgen-test] +-version = "0.3" diff --git a/rust-fastrand1.spec b/rust-fastrand1.spec new file mode 100644 index 0000000..3cbbb11 --- /dev/null +++ b/rust-fastrand1.spec @@ -0,0 +1,73 @@ +# Generated by rust2rpm 24 +# * missing dev-dependency: wyhash ^0.5 +%bcond_with check +%global debug_package %{nil} + +%global crate fastrand + +Name: rust-fastrand1 +Version: 1.9.0 +Release: %autorelease +Summary: Simple and fast random number generator + +License: Apache-2.0 OR MIT +URL: https://crates.io/crates/fastrand +Source: %{crates_source} +# Automatically generated patch to strip foreign dependencies +Patch: fastrand-fix-metadata-auto.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +A simple and fast random number generator.} + +%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-APACHE +%license %{crate_instdir}/LICENSE-MIT +%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 + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -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/sources b/sources new file mode 100644 index 0000000..5c24acf --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (fastrand-1.9.0.crate) = 321567b5fad8552c0efc4393b1e77d1bce288b0a88c475d432f79e91b3457ee6eb5db9e4d65ac6381b9990c9916f4651b6a76250df44d51ea3e25bd8184bdc52