From cf2ce1a4cef3436fd130838c4dfa7a9cfbdea512 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 27 Oct 2018 13:06:24 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rust-textwrap.spec | 72 +++++++++++++------ ...etadata.diff => textwrap-fix-metadata.diff | 2 +- 2 files changed, 50 insertions(+), 24 deletions(-) rename textwrap-0.10.0-fix-metadata.diff => textwrap-fix-metadata.diff (82%) diff --git a/rust-textwrap.spec b/rust-textwrap.spec index 8299f21..fdbbc4b 100644 --- a/rust-textwrap.spec +++ b/rust-textwrap.spec @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 0.10.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Small library for word wrapping, indenting, and dedenting strings License: MIT @@ -15,38 +15,66 @@ URL: https://crates.io/crates/textwrap Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * XXX: hyphenation is optional and brings a lot of legacy -Patch0: textwrap-0.10.0-fix-metadata.diff +Patch0: textwrap-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(term_size) >= 0.3.0 with crate(term_size) < 0.4.0) -BuildRequires: (crate(unicode-width) >= 0.1.3 with crate(unicode-width) < 0.2.0) +BuildRequires: (crate(term_size/default) >= 0.3.0 with crate(term_size/default) < 0.4.0) +BuildRequires: (crate(unicode-width/default) >= 0.1.3 with crate(unicode-width/default) < 0.2.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(lipsum) >= 0.5.0 with crate(lipsum) < 0.6.0) -BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) -BuildRequires: (crate(version-sync) >= 0.5.0 with crate(version-sync) < 0.6.0) +BuildRequires: (crate(lipsum/default) >= 0.5.0 with crate(lipsum/default) < 0.6.0) +BuildRequires: (crate(rand/default) >= 0.4.0 with crate(rand/default) < 0.5.0) +BuildRequires: (crate(version-sync/default) >= 0.5.0 with crate(version-sync/default) < 0.6.0) %endif -%description -%{summary}. +%global _description \ +Textwrap is a small library for word wrapping, indenting, and\ +dedenting strings.\ +\ +You can use it to format strings (such as help and error messages)\ +for display in commandline applications. It is designed to be efficient\ +and handle Unicode characters correctly. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Textwrap is a small library for word wrapping, indenting, and -dedenting strings. +%description devel %{_description} -You can use it to format strings (such as help and error messages) -for display in commandline applications. It is designed to be efficient -and handle Unicode characters correctly. +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE +%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}+term_size-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+term_size-devel %{_description} + +This package contains library source intended for building other packages +which use "term_size" feature of "%{crate}" crate. + +%files -n %{name}+term_size-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -63,12 +91,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 0.10.0-4 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 0.10.0-3 - Run tests in infrastructure diff --git a/textwrap-0.10.0-fix-metadata.diff b/textwrap-fix-metadata.diff similarity index 82% rename from textwrap-0.10.0-fix-metadata.diff rename to textwrap-fix-metadata.diff index 4922eb9..1eca9f1 100644 --- a/textwrap-0.10.0-fix-metadata.diff +++ b/textwrap-fix-metadata.diff @@ -1,5 +1,5 @@ --- textwrap-0.10.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ textwrap-0.10.0/Cargo.toml 2018-05-02T16:00:33.424423+02:00 ++++ textwrap-0.10.0/Cargo.toml 2018-10-27T13:04:06.413156+02:00 @@ -24,10 +24,6 @@ repository = "https://github.com/mgeisler/textwrap" [package.metadata.docs.rs]