From f78ad0836493d588cff14d9c2e79b670117dc291 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 13 Nov 2017 20:51:40 +0100 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + rust-textwrap.spec | 76 ++++++++++++++++++++++++++++++++ sources | 1 + textwrap-0.9.0-fix-metadata.diff | 23 ++++++++++ 4 files changed, 101 insertions(+) create mode 100644 .gitignore create mode 100644 rust-textwrap.spec create mode 100644 sources create mode 100644 textwrap-0.9.0-fix-metadata.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cb7b633 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/textwrap-0.9.0.crate diff --git a/rust-textwrap.spec b/rust-textwrap.spec new file mode 100644 index 0000000..5323483 --- /dev/null +++ b/rust-textwrap.spec @@ -0,0 +1,76 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate textwrap + +Name: rust-%{crate} +Version: 0.9.0 +Release: 1%{?dist} +Summary: Small library for word wrapping, indenting, and dedenting strings + +License: MIT +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 +# * Bump version-sync, lipsum to 0.4, https://github.com/mgeisler/textwrap/commit/5c20fdef54644e1050ddc4f8a98e0bccc48513b5 +Patch0: textwrap-0.9.0-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) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(lipsum) >= 0.4.0 with crate(lipsum) < 0.5.0) +BuildRequires: (crate(rand) >= 0.3.0 with crate(rand) < 0.4.0) +BuildRequires: (crate(version-sync) >= 0.4.0 with crate(version-sync) < 0.5.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +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. + +This package contains library source intended for building other packages +which use %{crate} from crates.io. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%files devel +%license LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Thu Nov 09 2017 Igor Gnatenko - 0.9.0-1 +- Update to 0.9.0 + +* Wed Jul 05 2017 Igor Gnatenko - 0.6.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..3bbf3c6 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (textwrap-0.9.0.crate) = e176f703f971eefb5cfc1ecf9047858bd7610a58fa4103879fd963b292c79872bd8466ef8fc9742a428ac707400dade307e72fa965dc4d61da66e932e5b20c35 diff --git a/textwrap-0.9.0-fix-metadata.diff b/textwrap-0.9.0-fix-metadata.diff new file mode 100644 index 0000000..37fa48c --- /dev/null +++ b/textwrap-0.9.0-fix-metadata.diff @@ -0,0 +1,23 @@ +--- textwrap-0.9.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ textwrap-0.9.0/Cargo.toml 2017-11-13T18:49:25.212619+01:00 +@@ -27,18 +27,14 @@ + [dependencies.unicode-width] + version = "0.1.3" + +-[dependencies.hyphenation] +-version = "0.6.1" +-optional = true +- + [dependencies.term_size] + version = "0.3.0" + optional = true + [dev-dependencies.lipsum] +-version = "0.3" ++version = "0.4" + + [dev-dependencies.version-sync] +-version = "0.2" ++version = "0.4" + + [dev-dependencies.rand] + version = "0.3"