From 62ff8ea9e28235a738a6de3e85115a6290703117 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 29 Aug 2022 19:29:20 -0600 Subject: [PATCH] Initial import --- .gitignore | 1 + nanorand-fix-metadata.diff | 11 +++ rust-nanorand.spec | 180 +++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 193 insertions(+) create mode 100644 .gitignore create mode 100644 nanorand-fix-metadata.diff create mode 100644 rust-nanorand.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eddb1f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/nanorand-0.7.0.crate diff --git a/nanorand-fix-metadata.diff b/nanorand-fix-metadata.diff new file mode 100644 index 0000000..608a1e2 --- /dev/null +++ b/nanorand-fix-metadata.diff @@ -0,0 +1,11 @@ +--- nanorand-0.7.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ nanorand-0.7.0/Cargo.toml 2022-08-18T03:42:55.620157+00:00 +@@ -29,7 +29,7 @@ + lto = "thin" + [dependencies.getrandom] + version = "0.2.5" +-features = ["rdrand", "js"] ++features = ["rdrand"] + optional = true + + [dependencies.zeroize] diff --git a/rust-nanorand.spec b/rust-nanorand.spec new file mode 100644 index 0000000..f001b9e --- /dev/null +++ b/rust-nanorand.spec @@ -0,0 +1,180 @@ +# Generated by rust2rpm 22 +%bcond_without check +%global debug_package %{nil} + +%global crate nanorand + +Name: rust-nanorand +Version: 0.7.0 +Release: %autorelease +Summary: Tiny, fast, zero-dep library for random number generation + +License: Zlib +URL: https://crates.io/crates/nanorand +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +Patch: nanorand-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Tiny, fast, zero-dep library for random number generation.} + +%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.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}+chacha-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+chacha-devel %{_description} + +This package contains library source intended for building other packages which +use the "chacha" feature of the "%{crate}" crate. + +%files -n %{name}+chacha-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+getrandom-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+getrandom-devel %{_description} + +This package contains library source intended for building other packages which +use the "getrandom" feature of the "%{crate}" crate. + +%files -n %{name}+getrandom-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+pcg64-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+pcg64-devel %{_description} + +This package contains library source intended for building other packages which +use the "pcg64" feature of the "%{crate}" crate. + +%files -n %{name}+pcg64-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+rdseed-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rdseed-devel %{_description} + +This package contains library source intended for building other packages which +use the "rdseed" feature of the "%{crate}" crate. + +%files -n %{name}+rdseed-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}+tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tls-devel %{_description} + +This package contains library source intended for building other packages which +use the "tls" feature of the "%{crate}" crate. + +%files -n %{name}+tls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+wyrand-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+wyrand-devel %{_description} + +This package contains library source intended for building other packages which +use the "wyrand" feature of the "%{crate}" crate. + +%files -n %{name}+wyrand-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+zeroize-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+zeroize-devel %{_description} + +This package contains library source intended for building other packages which +use the "zeroize" feature of the "%{crate}" crate. + +%files -n %{name}+zeroize-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..2c31f36 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (nanorand-0.7.0.crate) = 3ac650451d629852236eeb45dfee808acbea616036025676b47310100982d7e8317df647fe8649e7753dd0f57c501dcb3f7401c3d804af52ff2a2f50ace8cc69