Bump to rust-async-executor 1.5.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 7 Mar 2023 04:45:57 +0000 (13:45 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 7 Mar 2023 04:45:57 +0000 (13:45 +0900)
packaging/extern.patch [new file with mode: 0644]
packaging/rust-async-executor.manifest [new file with mode: 0644]
packaging/rust-async-executor.spec [new file with mode: 0644]

diff --git a/packaging/extern.patch b/packaging/extern.patch
new file mode 100644 (file)
index 0000000..119357b
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index 24fbfac..29a30d4 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -20,6 +20,13 @@
+ #![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
++extern crate futures_lite;
++extern crate async_lock;
++extern crate async_task;
++extern crate concurrent_queue;
++extern crate slab;
++extern crate fastrand;
++
+ use std::future::Future;
+ use std::marker::PhantomData;
+ use std::panic::{RefUnwindSafe, UnwindSafe};
diff --git a/packaging/rust-async-executor.manifest b/packaging/rust-async-executor.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-async-executor.spec b/packaging/rust-async-executor.spec
new file mode 100644 (file)
index 0000000..def6d61
--- /dev/null
@@ -0,0 +1,87 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate async-executor
+%global real_crate_name async_executor
+%global rustc_edition 2018
+
+Name:           rust-async-executor
+Version:        1.5.0
+Release:        1
+Summary:        Async executor
+
+License:        Apache-2.0 OR MIT
+URL:            https://crates.io/crates/async-executor
+Source:         %{crate}-%{version}.tar.gz
+Source1:        %{name}.manifest
+Source2:        extern.patch
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires:  rust
+BuildRequires:  rust-async-lock
+BuildRequires:  rust-async-task
+BuildRequires:  rust-concurrent-queue
+BuildRequires:  rust-fastrand
+BuildRequires:  rust-futures-lite
+BuildRequires:  rust-slab
+
+Requires:       rust-async-lock
+Requires:       rust-async-task
+Requires:       rust-concurrent-queue
+Requires:       rust-fastrand
+Requires:       rust-futures-lite
+Requires:       rust-slab
+
+# ==========================================================
+# dev-dependencies
+# ==========================================================
+# BuildRequires:  rust-async-channel 
+# BuildRequires:  rust-async-io 
+# BuildRequires:  rust-easy-parallel 
+# BuildRequires:  rust-num_cpus 
+# BuildRequires:  rust-once_cell 
+
+
+%description
+Async executor.
+
+%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