From 4f81ecce318725c7bdd2cf655c13fa09cb378a01 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 28 Oct 2018 01:27:46 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- parking_lot-fix-metadata.diff | 2 +- rust-parking_lot.spec | 62 +++++++++++++++++++++++++---------- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/parking_lot-fix-metadata.diff b/parking_lot-fix-metadata.diff index a95be8e..5065242 100644 --- a/parking_lot-fix-metadata.diff +++ b/parking_lot-fix-metadata.diff @@ -1,5 +1,5 @@ --- parking_lot-0.6.4/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ parking_lot-0.6.4/Cargo.toml 2018-09-03T09:29:36.345745+02:00 ++++ parking_lot-0.6.4/Cargo.toml 2018-10-28T01:29:00.636663+02:00 @@ -29,7 +29,5 @@ version = "0.5" diff --git a/rust-parking_lot.spec b/rust-parking_lot.spec index 4c066c9..681709c 100644 --- a/rust-parking_lot.spec +++ b/rust-parking_lot.spec @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 0.6.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Compact and efficient implementations of standard synchronization primitives # Upstream license specification: Apache-2.0/MIT @@ -22,27 +22,56 @@ Patch0: parking_lot-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(lock_api) >= 0.1.0 with crate(lock_api) < 0.2.0) -BuildRequires: (crate(parking_lot_core) >= 0.3.0 with crate(parking_lot_core) < 0.4.0) +BuildRequires: (crate(lock_api/default) >= 0.1.0 with crate(lock_api/default) < 0.2.0) +BuildRequires: (crate(lock_api/owning_ref) >= 0.1.0 with crate(lock_api/owning_ref) < 0.2.0) +BuildRequires: (crate(parking_lot_core/default) >= 0.3.0 with crate(parking_lot_core/default) < 0.4.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(rand) >= 0.5.0 with crate(rand) < 0.6.0) +BuildRequires: (crate(rand/default) >= 0.5.0 with crate(rand/default) < 0.6.0) %endif -%description -%{summary}. +%global _description \ +More compact and efficient implementations of the standard synchronization\ +primitives. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -More compact and efficient implementations of the standard synchronization -primitives. +%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 %{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}+owning_ref-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+owning_ref-devel %{_description} + +This package contains library source intended for building other packages +which use "owning_ref" feature of "%{crate}" crate. + +%files -n %{name}+owning_ref-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -59,13 +88,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.6.4-3 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 0.6.4-2 - Run tests in infrastructure