From 9060bcaea46a3d54714159b2be5d653e9ef3b0fb Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Nov 13 2017 14:10:56 +0000 Subject: initial import Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..371b1a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/encoding-index-tradchinese-1.20141219.5.crate diff --git a/encoding-index-tradchinese-1.20141219.5-fix-metadata.diff b/encoding-index-tradchinese-1.20141219.5-fix-metadata.diff new file mode 100644 index 0000000..1791eda --- /dev/null +++ b/encoding-index-tradchinese-1.20141219.5-fix-metadata.diff @@ -0,0 +1,11 @@ +--- encoding-index-tradchinese-1.20141219.5/Cargo.toml 2015-04-14T03:31:32+02:00 ++++ encoding-index-tradchinese-1.20141219.5/Cargo.toml 2017-11-12T11:07:42.102686+01:00 +@@ -12,7 +12,6 @@ + name = "encoding_index_tradchinese" + path = "lib.rs" + +-[dependencies.encoding_index_tests] ++[dev-dependencies.encoding_index_tests] + # TODO consider using dev-dependencies instead (Cargo issue #860) + version = "0.1.4" +-path = "../tests" diff --git a/rust-encoding-index-tradchinese.spec b/rust-encoding-index-tradchinese.spec new file mode 100644 index 0000000..d38594a --- /dev/null +++ b/rust-encoding-index-tradchinese.spec @@ -0,0 +1,63 @@ +# Generated by rust2rpm +# Tests require nightly compiler +%bcond_with check +%global debug_package %{nil} + +%global crate encoding-index-tradchinese + +Name: rust-%{crate} +Version: 1.20141219.5 +Release: 1%{?dist} +Summary: Index tables for traditional Chinese character encodings + +# https://github.com/lifthrasiir/rust-encoding/issues/111 +License: CC0 +URL: https://crates.io/crates/encoding-index-tradchinese +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * No paths +# * Make dev-dependency as dev one +Patch0: encoding-index-tradchinese-1.20141219.5-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(encoding_index_tests) >= 0.1.4 with crate(encoding_index_tests) < 0.2.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Index tables for traditional Chinese character encodings. + +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 +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Sun Nov 12 2017 Igor Gnatenko - 1.20141219.5-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..0b6ae0b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (encoding-index-tradchinese-1.20141219.5.crate) = 3b23213433947af7c56e9ea3e4eaf937b8083ce7e9e481b1351925a6da647be6a037b505116bab08ce73727bec75550bccb877ead6cb7fb0473bb3bd3d40833d