From b4f698b6a6acf415b602665bb14f5b25a6ed1716 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Nov 07 2017 17:19:03 +0000 Subject: initial import Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d8313f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/net2-0.2.31.crate diff --git a/net2-0.2.31-fix-metadata.diff b/net2-0.2.31-fix-metadata.diff new file mode 100644 index 0000000..7115422 --- /dev/null +++ b/net2-0.2.31-fix-metadata.diff @@ -0,0 +1,16 @@ +--- net2-0.2.31/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ net2-0.2.31/Cargo.toml 2017-11-07T11:02:03.180847+01:00 +@@ -35,13 +35,6 @@ + version = "0.2.16" + [target.x86_64-apple-darwin.dependencies.libc] + version = "0.2.16" +-[target."cfg(windows)".dependencies.kernel32-sys] +-version = "0.2" + +-[target."cfg(windows)".dependencies.winapi] +-version = "0.2" +- +-[target."cfg(windows)".dependencies.ws2_32-sys] +-version = "0.2" + [target."cfg(unix)".dependencies.libc] + version = "0.2.16" diff --git a/rust-net2.spec b/rust-net2.spec new file mode 100644 index 0000000..c547892 --- /dev/null +++ b/rust-net2.spec @@ -0,0 +1,69 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate net2 + +Name: rust-%{crate} +Version: 0.2.31 +Release: 1%{?dist} +Summary: Extensions to the standard library's networking types as proposed in RFC 1158 + +License: MIT or ASL 2.0 +URL: https://crates.io/crates/net2 +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * No windows +Patch0: net2-0.2.31-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(cfg-if) >= 0.1.0 with crate(cfg-if) < 0.2.0) +BuildRequires: (crate(libc) >= 0.2.16 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc) >= 0.2.16 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc) >= 0.2.16 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc) >= 0.2.16 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc) >= 0.2.16 with crate(libc) < 0.3.0) + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Extensions to the standard library's networking types as proposed in RFC 1158. + +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 +* Tue Nov 07 2017 Igor Gnatenko - 0.2.31-1 +- Update to 0.2.31 + +* Fri Jun 16 2017 Igor Gnatenko - 0.2.29-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..93ea742 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (net2-0.2.31.crate) = 23311a2b702d705219184667d4dd976c43111c88f5fb0ccda63849a7c5ebea19a08e4b63dd73647db805739184e0b297234b6c0248563c36a3f5ded4b5315dd2