From cf49f439650842750593b2a99d33dc3b2bbd58ad Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 27 Oct 2018 15:14:13 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- lazy_static-fix-metadata.diff | 10 ++++++ rust-lazy_static.spec | 61 ++++++++++++++++++++++++++--------- 2 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 lazy_static-fix-metadata.diff diff --git a/lazy_static-fix-metadata.diff b/lazy_static-fix-metadata.diff new file mode 100644 index 0000000..04fc66c --- /dev/null +++ b/lazy_static-fix-metadata.diff @@ -0,0 +1,10 @@ +--- lazy_static-1.1.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ lazy_static-1.1.0/Cargo.toml 2018-10-27T15:12:06.309029+02:00 +@@ -22,6 +22,7 @@ + categories = ["no-std", "rust-patterns", "memory-management"] + license = "MIT/Apache-2.0" + repository = "https://github.com/rust-lang-nursery/lazy-static.rs" ++exclude = ["/.travis.yml", "/appveyor.yml"] + [dependencies.spin] + version = "0.4.6" + optional = true diff --git a/rust-lazy_static.spec b/rust-lazy_static.spec index 23f5892..a58fa57 100644 --- a/rust-lazy_static.spec +++ b/rust-lazy_static.spec @@ -7,33 +7,65 @@ Name: rust-%{crate} Version: 1.1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Macro for declaring lazily evaluated statics in Rust +# Upstream license specification: MIT/Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/lazy_static Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Exclude CI files, https://github.com/rust-lang-nursery/lazy-static.rs/pull/127 +Patch0: lazy_static-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(spin) >= 0.4.6 with crate(spin) < 0.5.0) -# [build-dependencies] -BuildRequires: (crate(version_check) >= 0.1.4 with crate(version_check) < 0.2.0) +BuildRequires: (crate(spin/default) >= 0.4.6 with crate(spin/default) < 0.5.0) +BuildRequires: (crate(version_check/default) >= 0.1.4 with crate(version_check/default) < 0.2.0) -%description -%{summary}. +%global _description \ +A macro for declaring lazily evaluated statics in Rust. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A macro for declaring lazily evaluated statics in Rust. +%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 +%{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 %{crate} from crates.io. +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+spin-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+spin-devel %{_description} + +This package contains library source intended for building other packages +which use "spin" feature of "%{crate}" crate. + +%files -n %{name}+spin-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -50,13 +82,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 1.1.0-3 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 1.1.0-2 - Run tests in infrastructure