From 2229a1ea0cbbaf676496339c1e81864cd4003fc6 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Oct 27 2018 21:18:06 +0000 Subject: Adapt to new packaging Signed-off-by: Igor Gnatenko --- diff --git a/regex-fix-metadata.diff b/regex-fix-metadata.diff index 56108ee..f9da9d8 100644 --- a/regex-fix-metadata.diff +++ b/regex-fix-metadata.diff @@ -1,5 +1,5 @@ --- regex-1.0.5/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ regex-1.0.5/Cargo.toml 2018-10-07T20:03:14.619201+02:00 ++++ regex-1.0.5/Cargo.toml 2018-10-27T23:15:29.284902+02:00 @@ -22,6 +22,7 @@ categories = ["text-processing"] license = "MIT/Apache-2.0" diff --git a/rust-regex.spec b/rust-regex.spec index 43a4d3c..89b52b1 100644 --- a/rust-regex.spec +++ b/rust-regex.spec @@ -1,5 +1,5 @@ # Generated by rust2rpm -# Tests are run in infrastructure +# * Tests are run in infrastructure %bcond_with check %global debug_package %{nil} @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 1.0.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Implementation of regular expressions for Rust # Upstream license specification: MIT/Apache-2.0 @@ -21,32 +21,84 @@ Patch0: regex-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(aho-corasick) >= 0.6.7 with crate(aho-corasick) < 0.7.0) -BuildRequires: (crate(memchr) >= 2.0.2 with crate(memchr) < 3.0.0) -BuildRequires: (crate(regex-syntax) >= 0.6.2 with crate(regex-syntax) < 0.7.0) -BuildRequires: (crate(thread_local) >= 0.3.6 with crate(thread_local) < 0.4.0) -BuildRequires: (crate(utf8-ranges) >= 1.0.1 with crate(utf8-ranges) < 2.0.0) +BuildRequires: (crate(aho-corasick/default) >= 0.6.7 with crate(aho-corasick/default) < 0.7.0) +BuildRequires: (crate(memchr/default) >= 2.0.2 with crate(memchr/default) < 3.0.0) +BuildRequires: (crate(regex-syntax/default) >= 0.6.2 with crate(regex-syntax/default) < 0.7.0) +BuildRequires: (crate(thread_local/default) >= 0.3.6 with crate(thread_local/default) < 0.4.0) +BuildRequires: (crate(utf8-ranges/default) >= 1.0.1 with crate(utf8-ranges/default) < 2.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) +BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0) BuildRequires: (crate(quickcheck) >= 0.7.0 with crate(quickcheck) < 0.8.0) -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 \ +An implementation of regular expressions for Rust. This implementation uses\ +finite automata and guarantees linear time matching on all inputs. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -An implementation of regular expressions for Rust. This implementation uses -finite automata and guarantees linear time matching on all inputs. +%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 HACKING.md PERFORMANCE.md UNICODE.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}+pattern-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+pattern-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "pattern" feature of "%{crate}" crate. + +%files -n %{name}+pattern-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+unstable-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unstable-devel %{_description} + +This package contains library source intended for building other packages +which use "unstable" feature of "%{crate}" crate. + +%files -n %{name}+unstable-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+use_std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+use_std-devel %{_description} + +This package contains library source intended for building other packages +which use "use_std" feature of "%{crate}" crate. + +%files -n %{name}+use_std-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -63,12 +115,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md CHANGELOG.md HACKING.md PERFORMANCE.md UNICODE.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 1.0.5-3 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 1.0.5-2 - Exclude more unneeded files