From e177d250a1c8b8c4e6ce8136f4be90d143a73acc Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 28 Oct 2018 08:57:21 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- grep-fix-metadata.diff | 2 +- rust-grep.spec | 80 +++++++++++++++++++++++++++++++----------- 2 files changed, 60 insertions(+), 22 deletions(-) diff --git a/grep-fix-metadata.diff b/grep-fix-metadata.diff index f17b5f0..8a36ecd 100644 --- a/grep-fix-metadata.diff +++ b/grep-fix-metadata.diff @@ -1,5 +1,5 @@ --- grep-0.2.3/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ grep-0.2.3/Cargo.toml 2018-09-09T00:04:18.530025+02:00 ++++ grep-0.2.3/Cargo.toml 2018-10-28T08:56:47.934212+01:00 @@ -39,17 +39,6 @@ [dependencies.grep-searcher] diff --git a/rust-grep.spec b/rust-grep.spec index cee2c23..71e518d 100644 --- a/rust-grep.spec +++ b/rust-grep.spec @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 0.2.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Fast line oriented regex searching as a library # Upstream license specification: Unlicense/MIT @@ -22,31 +22,71 @@ Patch0: grep-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(grep-cli) >= 0.1.1 with crate(grep-cli) < 0.2.0) -BuildRequires: (crate(grep-matcher) >= 0.1.1 with crate(grep-matcher) < 0.2.0) -BuildRequires: (crate(grep-pcre2) >= 0.1.2 with crate(grep-pcre2) < 0.2.0) -BuildRequires: (crate(grep-printer) >= 0.1.1 with crate(grep-printer) < 0.2.0) -BuildRequires: (crate(grep-regex) >= 0.1.1 with crate(grep-regex) < 0.2.0) -BuildRequires: (crate(grep-searcher) >= 0.1.1 with crate(grep-searcher) < 0.2.0) +BuildRequires: (crate(grep-cli/default) >= 0.1.1 with crate(grep-cli/default) < 0.2.0) +BuildRequires: (crate(grep-matcher/default) >= 0.1.1 with crate(grep-matcher/default) < 0.2.0) +BuildRequires: (crate(grep-pcre2/default) >= 0.1.2 with crate(grep-pcre2/default) < 0.2.0) +BuildRequires: (crate(grep-printer/default) >= 0.1.1 with crate(grep-printer/default) < 0.2.0) +BuildRequires: (crate(grep-regex/default) >= 0.1.1 with crate(grep-regex/default) < 0.2.0) +BuildRequires: (crate(grep-searcher/default) >= 0.1.1 with crate(grep-searcher/default) < 0.2.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(termcolor) >= 1.0.0 with crate(termcolor) < 2.0.0) -BuildRequires: (crate(walkdir) >= 2.2.2 with crate(walkdir) < 3.0.0) +BuildRequires: (crate(termcolor/default) >= 1.0.0 with crate(termcolor/default) < 2.0.0) +BuildRequires: (crate(walkdir/default) >= 2.2.2 with crate(walkdir/default) < 3.0.0) %endif -%description -%{summary}. +%global _description \ +Fast line oriented regex searching as a library. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Fast line oriented regex searching as a library. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license COPYING UNLICENSE LICENSE-MIT +%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}+grep-pcre2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+grep-pcre2-devel %{_description} + +This package contains library source intended for building other packages +which use "grep-pcre2" feature of "%{crate}" crate. + +%files -n %{name}+grep-pcre2-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+pcre2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+pcre2-devel %{_description} + +This package contains library source intended for building other packages +which use "pcre2" feature of "%{crate}" crate. + +%files -n %{name}+pcre2-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -63,12 +103,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license COPYING UNLICENSE LICENSE-MIT -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sun Oct 28 2018 Igor Gnatenko - 0.2.3-3 +- Rebuild + * Sun Oct 07 2018 Igor Gnatenko - 0.2.3-2 - Run tests in infrastructure