From afe2137a7018ddba349d0e33ecb0b07e459788f5 Mon Sep 17 00:00:00 2001 From: Woohyun Jung Date: Tue, 14 Mar 2023 19:07:53 +0900 Subject: [PATCH] Bump to rust-fallible-streaming-iterator 0.1.9 --- packaging/extern.patch | 13 ++++ .../rust-fallible-streaming-iterator.manifest | 5 ++ .../rust-fallible-streaming-iterator.spec | 67 +++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 packaging/extern.patch create mode 100644 packaging/rust-fallible-streaming-iterator.manifest create mode 100644 packaging/rust-fallible-streaming-iterator.spec diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..6a860a7 --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 69262d6..4695b37 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -19,6 +19,8 @@ + #[cfg(feature = "std")] + extern crate core; + ++extern crate std; ++ + use core::cmp; + use core::marker::PhantomData; + diff --git a/packaging/rust-fallible-streaming-iterator.manifest b/packaging/rust-fallible-streaming-iterator.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-fallible-streaming-iterator.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-fallible-streaming-iterator.spec b/packaging/rust-fallible-streaming-iterator.spec new file mode 100644 index 0000000..bb86e29 --- /dev/null +++ b/packaging/rust-fallible-streaming-iterator.spec @@ -0,0 +1,67 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate fallible-streaming-iterator +%global real_crate_name fallible_streaming_iterator +%global rustc_edition 2015 + +Name: rust-fallible-streaming-iterator +Version: 0.1.9 +Release: 1 +Summary: Fallible streaming iteration + +# Upstream license specification: MIT/Apache-2.0 +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/fallible-streaming-iterator +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust + + + +%description +Fallible streaming iteration. + +%prep +%setup -q +cp %{SOURCE1} . +%{__patch} -p1 < %{SOURCE2} + +# ========================================================== +# build section +# crate-type : dylib, proc-macro, cdylib, bin, etc. +# ========================================================== +%build +%{rustc_std_build} --crate-type=dylib \ + --crate-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + ./src/lib.rs + +# ========================================================== +# install section +# ========================================================== +%install +install -d -m 0755 %{buildroot}%{_rust_dylibdir} +install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_rust_dylibdir}/lib%{real_crate_name}.so + +%clean + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +# ========================================================== +# files section +# ========================================================== +%files +%manifest %{name}.manifest +%license LICENSE-APACHE +%license LICENSE-MIT +%{_rust_dylibdir}/lib%{real_crate_name}.so -- 2.34.1