From bc73ec2a99363d6d8a1e9fdfe3404511bbbe8d20 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 7 Mar 2021 20:51:19 +0100 Subject: [PATCH] initial import (#1936137) --- .gitignore | 4 ++ README.md | 3 -- rust-tokio-native-tls.spec | 80 ++++++++++++++++++++++++++++++ sources | 1 + tokio-native-tls-fix-metadata.diff | 22 ++++++++ 5 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 rust-tokio-native-tls.spec create mode 100644 sources create mode 100644 tokio-native-tls-fix-metadata.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3842fdb --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/results_*/ +/*.src.rpm + +/tokio-native-tls-0.3.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index 4641080..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-tokio-native-tls - -The rust-tokio-native-tls package diff --git a/rust-tokio-native-tls.spec b/rust-tokio-native-tls.spec new file mode 100644 index 0000000..cbe8f1f --- /dev/null +++ b/rust-tokio-native-tls.spec @@ -0,0 +1,80 @@ +# Generated by rust2rpm 16 +# * tests need internet access +%bcond_with check +%global debug_package %{nil} + +%global crate tokio-native-tls + +Name: rust-%{crate} +Version: 0.3.0 +Release: 1%{?dist} +Summary: Implementation of TLS/SSL streams for Tokio using native-tls + +# Upstream license specification: MIT +License: MIT +URL: https://crates.io/crates/tokio-native-tls +Source: %{crates_source} +# Initial patched metadata +# * No windows, MacOS, iOS dependencies +Patch0: tokio-native-tls-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Implementation of TLS/SSL streams for Tokio using native-tls giving an +implementation of TLS for nonblocking I/O streams.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Sat Mar 06 2021 Fabio Valentini - 0.3.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..c55b5c5 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (tokio-native-tls-0.3.0.crate) = a8aa7586f15a3347ba9152497db84a098e751797c06df1a75d9b108689e14d6692b4efc6e5b49b5bf8f8fdb3bfc4f1157f56b3b0c9d9e753a8b31a61e65dfc4d diff --git a/tokio-native-tls-fix-metadata.diff b/tokio-native-tls-fix-metadata.diff new file mode 100644 index 0000000..428797c --- /dev/null +++ b/tokio-native-tls-fix-metadata.diff @@ -0,0 +1,22 @@ +--- tokio-native-tls-0.3.0/Cargo.toml 2020-12-24T17:24:00+00:00 ++++ tokio-native-tls-0.3.0/Cargo.toml 2021-03-06T22:43:16.388259+00:00 +@@ -21,6 +21,7 @@ + categories = ["asynchronous", "network-programming"] + license = "MIT" + repository = "https://github.com/tokio-rs/tls" ++exclude = ["/scripts"] + [package.metadata.docs.rs] + all-features = true + [dependencies.native-tls] +@@ -54,11 +55,3 @@ + features = ["full"] + [target."cfg(all(not(target_os = \"macos\"), not(windows), not(target_os = \"ios\")))".dev-dependencies.openssl] + version = "0.10" +-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dev-dependencies.security-framework] +-version = "0.2" +-[target."cfg(windows)".dev-dependencies.schannel] +-version = "0.1" +- +-[target."cfg(windows)".dev-dependencies.winapi] +-version = "0.3" +-features = ["lmcons", "basetsd", "minwinbase", "minwindef", "ntdef", "sysinfoapi", "timezoneapi", "wincrypt", "winerror"]