From 7cdf4190636087e2472e5418a1a09c725b8860ed Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 14 Jan 2018 23:05:05 +0100 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + flate2-1.0.1-fix-metadata.diff | 16 +++++++ rust-flate2.spec | 76 ++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 94 insertions(+) create mode 100644 .gitignore create mode 100644 flate2-1.0.1-fix-metadata.diff create mode 100644 rust-flate2.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..720e544 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/flate2-1.0.1.crate diff --git a/flate2-1.0.1-fix-metadata.diff b/flate2-1.0.1-fix-metadata.diff new file mode 100644 index 0000000..4fbea84 --- /dev/null +++ b/flate2-1.0.1-fix-metadata.diff @@ -0,0 +1,16 @@ +--- flate2-1.0.1/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ flate2-1.0.1/Cargo.toml 2018-01-13T16:39:31.747917+01:00 +@@ -45,11 +45,11 @@ + version = "0.1" + optional = true + [dev-dependencies.quickcheck] +-version = "0.4" ++version = "0.6" + default-features = false + + [dev-dependencies.rand] +-version = "0.3" ++version = "0.4" + + [dev-dependencies.tokio-core] + version = "0.1" diff --git a/rust-flate2.spec b/rust-flate2.spec new file mode 100644 index 0000000..783cab1 --- /dev/null +++ b/rust-flate2.spec @@ -0,0 +1,76 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate flate2 + +Name: rust-%{crate} +Version: 1.0.1 +Release: 1%{?dist} +Summary: DEFLATE compression and decompression exposed as Reader/Writer streams + +License: MIT or ASL 2.0 +URL: https://crates.io/crates/flate2 +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Bump rand to 0.4 +# * Bump quickcheck to 0.6 +# https://github.com/alexcrichton/flate2-rs/pull/146 +Patch0: flate2-1.0.1-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(futures) >= 0.1.0 with crate(futures) < 0.2.0) +BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) +BuildRequires: (crate(libz-sys) >= 1.0.0 with crate(libz-sys) < 2.0.0) +BuildRequires: (crate(miniz-sys) >= 0.1.7 with crate(miniz-sys) < 0.2.0) +BuildRequires: (crate(miniz_oxide_c_api) >= 0.1.0 with crate(miniz_oxide_c_api) < 0.2.0) +BuildRequires: (crate(tokio-io) >= 0.1.0 with crate(tokio-io) < 0.2.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(quickcheck) >= 0.6.0 with crate(quickcheck) < 0.7.0) +BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) +BuildRequires: (crate(tokio-core) >= 0.1.0 with crate(tokio-core) < 0.2.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Bindings to miniz.c for DEFLATE compression and decompression exposed as +Reader/Writer streams. Contains bindings for zlib, deflate, and gzip-based +streams. + +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-MIT LICENSE-APACHE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml + +%changelog +* Sat Jan 13 2018 Igor Gnatenko - 1.0.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..8aa1317 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (flate2-1.0.1.crate) = 2be6cf3228e9df76643e7b45ab1ea4956e7618e90e9bf8cce62f6d0bac864e2bd7a808aad1b54728797831b170801acf43a6a254d9268c8fc57052f1e2d172b9