From ed560128a0cd67f2027d40f7a71d95d15f5974e6 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Jul 15 2018 14:29:55 +0000 Subject: initial import Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e1a3926 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/native-tls-0.2.0.crate diff --git a/native-tls-0.2.0-fix-metadata.diff b/native-tls-0.2.0-fix-metadata.diff new file mode 100644 index 0000000..f1908de --- /dev/null +++ b/native-tls-0.2.0-fix-metadata.diff @@ -0,0 +1,29 @@ +--- native-tls-0.2.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ native-tls-0.2.0/Cargo.toml 2018-07-15T12:12:12.384425+02:00 +@@ -20,20 +20,6 @@ + repository = "https://github.com/sfackler/rust-native-tls" + [dev-dependencies.hex] + version = "0.3" +-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.lazy_static] +-version = "1.0" +- +-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.libc] +-version = "0.2" +- +-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.security-framework] +-version = "0.2.1" +- +-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.security-framework-sys] +-version = "0.2.1" +- +-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.tempfile] +-version = "3.0" + [target."cfg(not(any(target_os = \"windows\", target_os = \"macos\", target_os = \"ios\")))".dependencies.openssl] + version = "0.10.9" + +@@ -42,5 +28,3 @@ + + [target."cfg(not(any(target_os = \"windows\", target_os = \"macos\", target_os = \"ios\")))".dependencies.openssl-sys] + version = "0.9.30" +-[target."cfg(target_os = \"windows\")".dependencies.schannel] +-version = "0.1.13" diff --git a/rust-native-tls.spec b/rust-native-tls.spec new file mode 100644 index 0000000..446fbef --- /dev/null +++ b/rust-native-tls.spec @@ -0,0 +1,67 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate native-tls + +Name: rust-%{crate} +Version: 0.2.0 +Release: 1%{?dist} +Summary: Wrapper over a platform's native TLS implementation + +License: MIT or ASL 2.0 +URL: https://crates.io/crates/native-tls +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * No windows/macos/ios +Patch0: native-tls-0.2.0-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(openssl) >= 0.10.9 with crate(openssl) < 0.11.0) +BuildRequires: (crate(openssl-probe) >= 0.1.0 with crate(openssl-probe) < 0.2.0) +BuildRequires: (crate(openssl-sys) >= 0.9.30 with crate(openssl-sys) < 0.10.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(hex) >= 0.3.0 with crate(hex) < 0.4.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +A wrapper over a platform's native TLS implementation. + +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 CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml + +%changelog +* Sun Jul 15 2018 Igor Gnatenko - 0.2.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..b1774e2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (native-tls-0.2.0.crate) = 7d52181aa62a5cb74a819fcbbb80d91639bd78779bca3fb844b980199ef53c5b9942974a0961bc7a3e475e18af1968365f02988d2df54ab116418650d18d9a97