From f0e7523a34b8ec7a8c9051e33f22577772da6b83 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 27 Oct 2018 12:44:34 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- linked-hash-map-fix-metadata.diff | 7 ++- rust-linked-hash-map.spec | 96 +++++++++++++++++++++++++------ 2 files changed, 83 insertions(+), 20 deletions(-) diff --git a/linked-hash-map-fix-metadata.diff b/linked-hash-map-fix-metadata.diff index 7173520..81b12d7 100644 --- a/linked-hash-map-fix-metadata.diff +++ b/linked-hash-map-fix-metadata.diff @@ -1,6 +1,6 @@ --- linked-hash-map-0.5.1/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ linked-hash-map-0.5.1/Cargo.toml 2018-10-07T16:24:16.076686+02:00 -@@ -21,10 +21,6 @@ ++++ linked-hash-map-0.5.1/Cargo.toml 2018-10-27T12:43:20.175645+02:00 +@@ -21,10 +21,7 @@ keywords = ["data-structures"] license = "MIT/Apache-2.0" repository = "https://github.com/contain-rs/linked-hash-map" @@ -8,10 +8,11 @@ -version = "0.*" -optional = true - ++exclude = ["/.travis.yml", "/deploy-docs.sh"] [dependencies.heapsize] version = "0.4" optional = true -@@ -33,11 +29,10 @@ +@@ -33,11 +30,10 @@ version = "1.0" optional = true diff --git a/rust-linked-hash-map.spec b/rust-linked-hash-map.spec index ffa38bf..760022e 100644 --- a/rust-linked-hash-map.spec +++ b/rust-linked-hash-map.spec @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 0.5.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: HashMap wrapper that holds key-value pairs in insertion order # Upstream license specification: MIT/Apache-2.0 @@ -17,31 +17,96 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ # Initial patched metadata # * clippy is nightly # * move serde_test to dev-deps +# * Exclude CI files, https://github.com/contain-rs/linked-hash-map/pull/94 Patch0: linked-hash-map-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(heapsize) >= 0.4.0 with crate(heapsize) < 0.5.0) -BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) +BuildRequires: (crate(heapsize/default) >= 0.4.0 with crate(heapsize/default) < 0.5.0) +BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(serde_test) >= 1.0.0 with crate(serde_test) < 2.0.0) +BuildRequires: (crate(serde_test/default) >= 1.0.0 with crate(serde_test/default) < 2.0.0) %endif -%description -%{summary}. +%global _description \ +A HashMap wrapper that holds key-value pairs in insertion order. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A HashMap wrapper that holds key-value pairs in insertion order. +%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-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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+heapsize-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+heapsize-devel %{_description} + +This package contains library source intended for building other packages +which use "heapsize" feature of "%{crate}" crate. + +%files -n %{name}+heapsize-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+heapsize_impl-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+heapsize_impl-devel %{_description} + +This package contains library source intended for building other packages +which use "heapsize_impl" feature of "%{crate}" crate. + +%files -n %{name}+heapsize_impl-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}+serde_impl-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde_impl-devel %{_description} + +This package contains library source intended for building other packages +which use "serde_impl" feature of "%{crate}" crate. + +%files -n %{name}+serde_impl-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -58,13 +123,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}/deploy-docs.sh - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 0.5.1-5 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 0.5.1-4 - Run tests in infrastructure