From: DongHun Kwak Date: Mon, 10 Apr 2023 01:32:49 +0000 (+0900) Subject: Bump to rust-uuid-macro-internal 1.3.1 X-Git-Tag: accepted/tizen/rust/20231016.022157^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen;p=platform%2Fupstream%2Frust-uuid-macro-internal.git Bump to rust-uuid-macro-internal 1.3.1 --- diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..28c427c --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib.rs b/src/lib.rs +index e1d517b..5a63fd9 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -8,6 +8,8 @@ + //! features = ["macro-diagnostics"] + //! ``` + ++extern crate proc_macro; ++ + use proc_macro::TokenStream; + use proc_macro2::TokenStream as TokenStream2; + use quote::{quote, quote_spanned}; diff --git a/packaging/rust-uuid-macro-internal.manifest b/packaging/rust-uuid-macro-internal.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-uuid-macro-internal.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-uuid-macro-internal.spec b/packaging/rust-uuid-macro-internal.spec new file mode 100644 index 0000000..02b95a9 --- /dev/null +++ b/packaging/rust-uuid-macro-internal.spec @@ -0,0 +1,75 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate uuid-macro-internal +%global real_crate_name uuid_macro_internal +%global rustc_edition 2018 + +Name: rust-uuid-macro-internal +Version: 1.3.1 +Release: 1 +Summary: Private implementation details of the uuid! macro + +License: Apache-2.0 OR MIT +URL: https://crates.io/crates/uuid-macro-internal +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-proc-macro2 +BuildRequires: rust-quote +BuildRequires: rust-syn + +Requires: rust-proc-macro2 +Requires: rust-quote +Requires: rust-syn + + +%description +Private implementation details of the uuid! macro. + +%prep +%setup -q +cp %{SOURCE1} . +%{__patch} -p1 < %{SOURCE2} + +# ========================================================== +# build section +# crate-type : dylib, proc-macro, cdylib, bin, etc. +# ========================================================== +%build +%{rustc_std_build} --crate-type=proc-macro \ + --crate-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + %rust_dylib_extern proc_macro2 \ + %rust_dylib_extern quote \ + %rust_dylib_extern syn \ + ./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