From: DongHun Kwak Date: Fri, 24 Mar 2023 03:21:23 +0000 (+0900) Subject: Bump to rust-radium 0.7.0 X-Git-Tag: accepted/tizen/rust/20231016.021732~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ed467bf8eaa11ca009a646b04c9df2a2dcc2984;p=platform%2Fupstream%2Frust-radium.git Bump to rust-radium 0.7.0 --- diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..b56a648 --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,12 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 00e9588..e5c4fc0 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -28,7 +28,6 @@ + //! [`AtomicUsize`]: core::sync::atomic::AtomicUsize + //! [`Cell`]: core::cell::Cell + +-#![no_std] + #![deny(unconditional_recursion)] + + #[macro_use] diff --git a/packaging/rust-radium.manifest b/packaging/rust-radium.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-radium.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-radium.spec b/packaging/rust-radium.spec new file mode 100644 index 0000000..c40adb2 --- /dev/null +++ b/packaging/rust-radium.spec @@ -0,0 +1,77 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate radium +%global real_crate_name radium +%global rustc_edition 2021 + +Name: rust-radium +Version: 0.7.0 +Release: 1 +Summary: Portable interfaces for maybe-atomic types + +License: MIT +URL: https://crates.io/crates/radium +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust + +# ========================================================== +# dev-dependencies +# ========================================================== +# BuildRequires: rust-static_assertions + + +%description +Portable interfaces for maybe-atomic types. + +%prep +%setup -q +cp %{SOURCE1} . +%{__patch} -p1 < %{SOURCE2} + +# ========================================================== +# build section +# crate-type : dylib, proc-macro, cdylib, bin, etc. +# ========================================================== +%build +%ifarch %{ix86} armv7l armv7hl +export RUSTC_TARGET_HAS_ATOMIC=32 +%endif +%ifarch x86_64 aarch64 +export RUSTC_TARGET_HAS_ATOMIC=64 +%endif +%{rustc_std_build} --crate-type=dylib \ + --crate-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + --cfg='feature="atomic"' \ + --cfg="target_has_atomic=\"$RUSTC_TARGET_HAS_ATOMIC\"" \ + ./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.txt +%{_rust_dylibdir}/lib%{real_crate_name}.so