From 6b8269e0f46ed8db7746519bc365ba8963b1ac81 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 27 Oct 2018 02:03:32 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- ...ix-metadata.diff => rand-fix-metadata.diff | 6 +- rust-rand.spec | 158 +++++++++++++++--- 2 files changed, 139 insertions(+), 25 deletions(-) rename rand-0.5.3-fix-metadata.diff => rand-fix-metadata.diff (85%) diff --git a/rand-0.5.3-fix-metadata.diff b/rand-fix-metadata.diff similarity index 85% rename from rand-0.5.3-fix-metadata.diff rename to rand-fix-metadata.diff index 1587c5c..2bfb701 100644 --- a/rand-0.5.3-fix-metadata.diff +++ b/rand-fix-metadata.diff @@ -1,10 +1,10 @@ ---- rand-0.5.3/Cargo.toml 1969-12-31T16:00:00-08:00 -+++ rand-0.5.3/Cargo.toml 2018-06-30T16:50:36.060662-07:00 +--- rand-0.5.5/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ rand-0.5.5/Cargo.toml 2018-10-27T02:05:28.393136+02:00 @@ -22,6 +22,7 @@ categories = ["algorithms", "no-std"] license = "MIT/Apache-2.0" repository = "https://github.com/rust-lang-nursery/rand" -+exclude = ["utils/**"] ++exclude = ["/scripts/*", "/.travis.yml", "/appveyor.yml"] [package.metadata.docs.rs] all-features = true [dependencies.log] diff --git a/rust-rand.spec b/rust-rand.spec index 853aa5b..4587c11 100644 --- a/rust-rand.spec +++ b/rust-rand.spec @@ -7,43 +7,160 @@ Name: rust-%{crate} Version: 0.5.5 -Release: 2%{?dist} -Summary: Random number generators +Release: 3%{?dist} +Summary: Random number generators and other randomness functionality -License: MIT or ASL-2.0 +# Upstream license specification: MIT/Apache-2.0 +License: MIT or ASL 2.0 URL: https://crates.io/crates/rand Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata -# * Exclude python utilities +# * Exclude CI files, https://github.com/rust-random/rand/pull/635 # * Remove non-unix dependencies -Patch0: rand-0.5.3-fix-metadata.diff +Patch0: rand-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) -BuildRequires: (crate(log) >= 0.4.0 with crate(log) < 0.5.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(log/default) >= 0.4.0 with crate(log/default) < 0.5.0) BuildRequires: (crate(rand_core) >= 0.2.0 with crate(rand_core) < 0.3.0) -BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) -BuildRequires: (crate(serde_derive) >= 1.0.0 with crate(serde_derive) < 2.0.0) +BuildRequires: (crate(rand_core/alloc) >= 0.2.0 with crate(rand_core/alloc) < 0.3.0) +BuildRequires: (crate(rand_core/serde1) >= 0.2.0 with crate(rand_core/serde1) < 0.3.0) +BuildRequires: (crate(rand_core/std) >= 0.2.0 with crate(rand_core/std) < 0.3.0) +BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0) +BuildRequires: (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(bincode) >= 1.0.0 with crate(bincode) < 2.0.0) +BuildRequires: (crate(bincode/default) >= 1.0.0 with crate(bincode/default) < 2.0.0) %endif -%description +%global _description \ Random number generators and other randomness functionality. +%description %{_description} + %package devel Summary: %{summary} BuildArch: noarch -%description devel -Random number generators and other randomness functionality. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%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}/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 %{crate} from crates.io. +which use "alloc" feature of "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+i128_support-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+i128_support-devel %{_description} + +This package contains library source intended for building other packages +which use "i128_support" feature of "%{crate}" crate. + +%files -n %{name}+i128_support-devel +%ghost %{cargo_registry}/%{crate}-%{version}/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}/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}/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 "serde" feature of "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{cargo_registry}/%{crate}-%{version}/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}/Cargo.toml + +%package -n %{name}+serde_derive-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde_derive-devel %{_description} + +This package contains library source intended for building other packages +which use "serde_derive" feature of "%{crate}" crate. + +%files -n %{name}+serde_derive-devel +%ghost %{cargo_registry}/%{crate}-%{version}/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}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -60,13 +177,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 0.5.5-3 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 0.5.5-2 - Run tests in infrastructure