Bump to rust-enum-iterator 2.1.0 accepted/tizen_rust tizen accepted/tizen/rust/20250617.043242
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 22 May 2025 06:13:27 +0000 (15:13 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 22 May 2025 06:13:27 +0000 (15:13 +0900)
packaging/extern.patch [new file with mode: 0644]
packaging/rust-enum-iterator.manifest [new file with mode: 0644]
packaging/rust-enum-iterator.spec [new file with mode: 0644]

diff --git a/packaging/extern.patch b/packaging/extern.patch
new file mode 100644 (file)
index 0000000..db855ca
--- /dev/null
@@ -0,0 +1,12 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index 16d4726..da9e2ba 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -62,7 +62,6 @@
+ #![deny(missing_docs)]
+ #![deny(warnings)]
+-#![no_std]
+ use core::{cmp::Ordering, iter::FusedIterator, ops::ControlFlow, task::Poll};
diff --git a/packaging/rust-enum-iterator.manifest b/packaging/rust-enum-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-enum-iterator.spec b/packaging/rust-enum-iterator.spec
new file mode 100644 (file)
index 0000000..291eb99
--- /dev/null
@@ -0,0 +1,69 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate enum-iterator
+%global real_crate_name enum_iterator
+%global rustc_edition 2021
+
+Name:           rust-enum-iterator
+Version:        2.1.0
+Release:        1
+Summary:        Tools to iterate over all values of a type (e.g
+
+License:        0BSD
+URL:            https://crates.io/crates/enum-iterator
+Source:         %{crate}-%{version}.tar.gz
+Source1:        %{name}.manifest
+Source2:        extern.patch
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires:  rust
+BuildRequires:  rust-enum-iterator-derive
+
+Requires:  rust-enum-iterator-derive
+
+
+%description
+Tools to iterate over all values of a type (e.g. all variants of an
+enumeration).
+
+%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}} \
+        %rust_dylib_extern enum_iterator_derive \
+        ./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
+%{_rust_dylibdir}/lib%{real_crate_name}.so