From: DongHun Kwak Date: Wed, 8 Mar 2023 06:56:44 +0000 (+0900) Subject: Bump to rust-crossbeam-channel 0.5.7 X-Git-Tag: accepted/tizen/rust/20231016.021042~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca9353b28825e67d9d487a99a0fc12e08838d5fb;p=platform%2Fupstream%2Frust-crossbeam-channel.git Bump to rust-crossbeam-channel 0.5.7 --- diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..f7ab68d --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib.rs b/src/lib.rs +index cc1ef11..49c18da 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -336,6 +336,8 @@ + )] + #![cfg_attr(not(feature = "std"), no_std)] + ++extern crate crossbeam_utils; ++ + use cfg_if::cfg_if; + + cfg_if! { diff --git a/packaging/rust-crossbeam-channel.manifest b/packaging/rust-crossbeam-channel.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-crossbeam-channel.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-crossbeam-channel.spec b/packaging/rust-crossbeam-channel.spec new file mode 100644 index 0000000..9de2fbf --- /dev/null +++ b/packaging/rust-crossbeam-channel.spec @@ -0,0 +1,76 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate crossbeam-channel +%global real_crate_name crossbeam_channel +%global rustc_edition 2018 + +Name: rust-crossbeam-channel +Version: 0.5.7 +Release: 1 +Summary: Multi-producer multi-consumer channels for message passing + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/crossbeam-channel +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-cfg-if +BuildRequires: rust-crossbeam-utils + +# ========================================================== +# dev-dependencies +# ========================================================== +# BuildRequires: rust-num_cpus +# BuildRequires: rust-rand +# BuildRequires: rust-signal-hook + + +%description +Multi-producer multi-consumer channels for message passing. + +%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}} \ + --extern cfg_if=%{_rust_dylibdir}/libcfg_if.so \ + --cfg='feature="std"' \ + ./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