From f6b3678353645b0458f1181c09993522dbecd46f Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 28 Oct 2018 02:15:29 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- grep-searcher-fix-metadata.diff | 2 +- rust-grep-searcher.spec | 58 ++++++++++++++++++++------------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/grep-searcher-fix-metadata.diff b/grep-searcher-fix-metadata.diff index 9924e6b..6ff098f 100644 --- a/grep-searcher-fix-metadata.diff +++ b/grep-searcher-fix-metadata.diff @@ -1,5 +1,5 @@ --- grep-searcher-0.1.1/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ grep-searcher-0.1.1/Cargo.toml 2018-09-08T14:00:27.204896+02:00 ++++ grep-searcher-0.1.1/Cargo.toml 2018-10-28T02:14:44.810581+01:00 @@ -46,7 +46,3 @@ [dev-dependencies.regex] diff --git a/rust-grep-searcher.spec b/rust-grep-searcher.spec index 6e75645..a9535f8 100644 --- a/rust-grep-searcher.spec +++ b/rust-grep-searcher.spec @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 0.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Fast line oriented regex searching as a library # Upstream license specification: Unlicense/MIT @@ -21,32 +21,48 @@ Patch0: grep-searcher-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(bytecount) >= 0.3.2 with crate(bytecount) < 0.4.0) -BuildRequires: (crate(encoding_rs) >= 0.8.6 with crate(encoding_rs) < 0.9.0) -BuildRequires: (crate(encoding_rs_io) >= 0.1.2 with crate(encoding_rs_io) < 0.2.0) -BuildRequires: (crate(grep-matcher) >= 0.1.1 with crate(grep-matcher) < 0.2.0) -BuildRequires: (crate(log) >= 0.4.5 with crate(log) < 0.5.0) -BuildRequires: (crate(memchr) >= 2.0.2 with crate(memchr) < 3.0.0) -BuildRequires: (crate(memmap) >= 0.6.2 with crate(memmap) < 0.7.0) +BuildRequires: (crate(bytecount/default) >= 0.3.2 with crate(bytecount/default) < 0.4.0) +BuildRequires: (crate(encoding_rs/default) >= 0.8.6 with crate(encoding_rs/default) < 0.9.0) +BuildRequires: (crate(encoding_rs_io/default) >= 0.1.2 with crate(encoding_rs_io/default) < 0.2.0) +BuildRequires: (crate(grep-matcher/default) >= 0.1.1 with crate(grep-matcher/default) < 0.2.0) +BuildRequires: (crate(log/default) >= 0.4.5 with crate(log/default) < 0.5.0) +BuildRequires: (crate(memchr/default) >= 2.0.2 with crate(memchr/default) < 3.0.0) +BuildRequires: (crate(memmap/default) >= 0.6.2 with crate(memmap/default) < 0.7.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(grep-regex) >= 0.1.1 with crate(grep-regex) < 0.2.0) -BuildRequires: (crate(regex) >= 1.0.5 with crate(regex) < 2.0.0) +BuildRequires: (crate(grep-regex/default) >= 0.1.1 with crate(grep-regex/default) < 0.2.0) +BuildRequires: (crate(regex/default) >= 1.0.5 with crate(regex/default) < 2.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} from crates.io. +which use "%{crate}" crate. + +%files devel +%license 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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -63,12 +79,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license UNLICENSE LICENSE-MIT -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sun Oct 28 2018 Igor Gnatenko - 0.1.1-3 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 0.1.1-2 - Run tests in infrastructure