Bump to rust-fallible-streaming-iterator 0.1.9 accepted/tizen_rust tizen accepted/tizen/rust/20231016.021156
authorWoohyun Jung <wh0705.jung@samsung.com>
Tue, 14 Mar 2023 10:07:53 +0000 (19:07 +0900)
committerWoohyun Jung <wh0705.jung@samsung.com>
Tue, 14 Mar 2023 10:07:53 +0000 (19:07 +0900)
packaging/extern.patch [new file with mode: 0644]
packaging/rust-fallible-streaming-iterator.manifest [new file with mode: 0644]
packaging/rust-fallible-streaming-iterator.spec [new file with mode: 0644]

diff --git a/packaging/extern.patch b/packaging/extern.patch
new file mode 100644 (file)
index 0000000..6a860a7
--- /dev/null
@@ -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 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/rust-fallible-streaming-iterator.spec b/packaging/rust-fallible-streaming-iterator.spec
new file mode 100644 (file)
index 0000000..bb86e29
--- /dev/null
@@ -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