diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b643d42 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/zoneinfo_compiled-0.4.7.crate diff --git a/rust-zoneinfo_compiled.spec b/rust-zoneinfo_compiled.spec new file mode 100644 index 0000000..5035529 --- /dev/null +++ b/rust-zoneinfo_compiled.spec @@ -0,0 +1,61 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate zoneinfo_compiled + +Name: rust-%{crate} +Version: 0.4.7 +Release: 1%{?dist} +Summary: Library for parsing compiled zoneinfo files + +# https://github.com/rust-datetime/zoneinfo-compiled/issues/1 +License: MIT +URL: https://crates.io/crates/zoneinfo_compiled +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Bump byteorder to 1, https://github.com/rust-datetime/zoneinfo-compiled/pull/2 +Patch0: zoneinfo_compiled-0.4.7-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0) +BuildRequires: (crate(datetime) >= 0.4.7 with crate(datetime) < 0.5.0) + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Library for parsing compiled zoneinfo files. + +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 +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Sat Nov 18 2017 Igor Gnatenko - 0.4.7-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..f5139b3 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (zoneinfo_compiled-0.4.7.crate) = 5ca199532bccfd1e3e2bef62c009ae9164d6b07378d05db38aad84f65313f3f0f7921063f001128d4a57d08f8bd6d18c27f553cbcade7c488de652dd99d559cc diff --git a/zoneinfo_compiled-0.4.7-fix-metadata.diff b/zoneinfo_compiled-0.4.7-fix-metadata.diff new file mode 100644 index 0000000..47c1e2a --- /dev/null +++ b/zoneinfo_compiled-0.4.7-fix-metadata.diff @@ -0,0 +1,8 @@ +--- zoneinfo_compiled-0.4.7/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ zoneinfo_compiled-0.4.7/Cargo.toml 2017-11-27T13:38:36.405587+01:00 +@@ -25,4 +25,4 @@ + version = "0.4.7" + + [dependencies.byteorder] +-version = "0.4" ++version = "1"