From 8aee3f986e600b23175950c2dee8af2b1f64d76d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 28 Oct 2018 02:40:02 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rayon-1.0.2-fix-metadata.diff | 11 ------ rayon-fix-metadata.diff | 13 ++++++++ rust-rayon.spec | 63 ++++++++++++++++++++++------------- 3 files changed, 52 insertions(+), 35 deletions(-) delete mode 100644 rayon-1.0.2-fix-metadata.diff create mode 100644 rayon-fix-metadata.diff diff --git a/rayon-1.0.2-fix-metadata.diff b/rayon-1.0.2-fix-metadata.diff deleted file mode 100644 index 000021e..0000000 --- a/rayon-1.0.2-fix-metadata.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- rayon-1.0.2/Cargo.toml 1969-12-31T16:00:00-08:00 -+++ rayon-1.0.2/Cargo.toml 2018-07-16T23:01:04.994635-07:00 -@@ -23,7 +23,7 @@ - license = "Apache-2.0/MIT" - repository = "https://github.com/rayon-rs/rayon" - [dependencies.crossbeam-deque] --version = "0.2.0" -+version = "0.4" - - [dependencies.either] - version = "1.0" diff --git a/rayon-fix-metadata.diff b/rayon-fix-metadata.diff new file mode 100644 index 0000000..cae23a7 --- /dev/null +++ b/rayon-fix-metadata.diff @@ -0,0 +1,13 @@ +--- rayon-1.0.2/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ rayon-1.0.2/Cargo.toml 2018-10-28T02:41:25.392274+02:00 +@@ -22,8 +22,9 @@ + categories = ["concurrency"] + license = "Apache-2.0/MIT" + repository = "https://github.com/rayon-rs/rayon" ++exclude = ["/ci/*", "/scripts/*", "/.travis.yml", "/appveyor.yml", "/bors.toml"] + [dependencies.crossbeam-deque] +-version = "0.2.0" ++version = "0.4.0" + + [dependencies.either] + version = "1.0" diff --git a/rust-rayon.spec b/rust-rayon.spec index eb58a56..8e1ce6b 100644 --- a/rust-rayon.spec +++ b/rust-rayon.spec @@ -1,6 +1,6 @@ # Generated by rust2rpm -# Some tests are broken on non-x86_64 -# https://github.com/rayon-rs/rayon/issues/585 +# * Some tests are broken on non-x86_64 +# https://github.com/rayon-rs/rayon/issues/585 %bcond_with check %global debug_package %{nil} @@ -8,44 +8,62 @@ Name: rust-%{crate} Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple work-stealing parallelism for Rust +# Upstream license specification: Apache-2.0/MIT License: ASL 2.0 or MIT URL: https://crates.io/crates/rayon Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump crossbeam-deque to 0.4, upstream doesn't want this -Patch0: rayon-1.0.2-fix-metadata.diff +# * Exclude CI files, https://github.com/rayon-rs/rayon/pull/609 +Patch0: rayon-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(crossbeam-deque) >= 0.4.0 with crate(crossbeam-deque) < 0.5.0) +BuildRequires: (crate(crossbeam-deque/default) >= 0.4.0 with crate(crossbeam-deque/default) < 0.5.0) BuildRequires: (crate(either) >= 1.0.0 with crate(either) < 2.0.0) -BuildRequires: (crate(rayon-core) >= 1.4.0 with crate(rayon-core) < 2.0.0) +BuildRequires: (crate(rayon-core/default) >= 1.4.0 with crate(rayon-core/default) < 2.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(docopt) >= 1.0.0 with crate(docopt) < 2.0.0) -BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) -BuildRequires: (crate(rand) >= 0.5.0 with crate(rand) < 0.6.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(docopt/default) >= 1.0.0 with crate(docopt/default) < 2.0.0) +BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0) +BuildRequires: (crate(rand/default) >= 0.5.0 with crate(rand/default) < 0.6.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) %endif -%description -%{summary}. +%global _description \ +Simple work-stealing parallelism for Rust. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Simple work-stealing parallelism for Rust. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "%{crate}" crate. + +%files devel +%license LICENSE-APACHE LICENSE-MIT +%doc README.md RELEASES.md FAQ.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 %prep %autosetup -n %{crate}-%{version} -p1 @@ -62,13 +80,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-APACHE LICENSE-MIT -%doc README.md RELEASES.md FAQ.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/{appveyor.yml,bors.toml,ci,scripts} - %changelog +* Sun Oct 28 2018 Igor Gnatenko - 1.0.2-2 +- Adapt to new packaging + * Tue Jul 17 2018 Josh Stone - 1.0.2-1 - Update to 1.0.2