diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c19f0a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rand-0.7.3.crate diff --git a/.rust2rpm.conf b/.rust2rpm.conf new file mode 100644 index 0000000..759930b --- /dev/null +++ b/.rust2rpm.conf @@ -0,0 +1,7 @@ +[DEFAULT] +unwanted-features = + nightly + packed_simd + simd_support + stdweb + wasm-bindgen diff --git a/rand-fix-metadata.diff b/rand-fix-metadata.diff new file mode 100644 index 0000000..e129326 --- /dev/null +++ b/rand-fix-metadata.diff @@ -0,0 +1,11 @@ +--- rand-0.7.3/Cargo.toml 2020-01-10T21:46:19+00:00 ++++ rand-0.7.3/Cargo.toml 2021-01-03T11:18:36.633761+00:00 +@@ -67,8 +67,6 @@ + [target."cfg(not(target_os = \"emscripten\"))".dependencies.rand_chacha] + version = "0.2.1" + default-features = false +-[target."cfg(target_os = \"emscripten\")".dependencies.rand_hc] +-version = "0.2" + [target."cfg(unix)".dependencies.libc] + version = "0.2.22" + optional = true diff --git a/rust-rand0.7.spec b/rust-rand0.7.spec new file mode 100644 index 0000000..76956a5 --- /dev/null +++ b/rust-rand0.7.spec @@ -0,0 +1,186 @@ +# Generated by rust2rpm 17 +%bcond_with check +%global debug_package %{nil} + +%global crate rand + +Name: rust-%{crate}0.7 +Version: 0.7.3 +Release: 1%{?dist} +Summary: Random number generators and other randomness functionality + +# Upstream license specification: MIT OR Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/rand +Source: %{crates_source} +# Initial patched metadata +# * Remove non-unix dependencies +Patch0: rand-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Random number generators and other randomness functionality.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE COPYRIGHT +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "alloc" feature of "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "getrandom" feature of "%{crate}" crate. + +%files -n %{name}+getrandom-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+getrandom_package-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+getrandom_package-devel %{_description} + +This package contains library source intended for building other packages +which use "getrandom_package" feature of "%{crate}" crate. + +%files -n %{name}+getrandom_package-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+libc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+libc-devel %{_description} + +This package contains library source intended for building other packages +which use "libc" feature of "%{crate}" crate. + +%files -n %{name}+libc-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+log-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+log-devel %{_description} + +This package contains library source intended for building other packages +which use "log" feature of "%{crate}" crate. + +%files -n %{name}+log-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+rand_pcg-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rand_pcg-devel %{_description} + +This package contains library source intended for building other packages +which use "rand_pcg" feature of "%{crate}" crate. + +%files -n %{name}+rand_pcg-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+serde1-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde1-devel %{_description} + +This package contains library source intended for building other packages +which use "serde1" feature of "%{crate}" crate. + +%files -n %{name}+serde1-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+small_rng-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+small_rng-devel %{_description} + +This package contains library source intended for building other packages +which use "small_rng" feature of "%{crate}" crate. + +%files -n %{name}+small_rng-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "std" feature of "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 +* Sun Jan 03 12:18:36 CET 2021 Igor Raits - 0.7.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..ee1b8d8 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rand-0.7.3.crate) = f9b68ef9446f1ca2c8092c50990f15c1b4cb5529eeeac4df8d69755e0b7253c663c587775e7cb0a7298c31edb444975dda34926759306541f6d43d0d3cf57b7e