From 175325010e29fc3fd756607c9dc5f9f1cee13a3a Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Fri, 10 Mar 2023 07:47:46 +0900 Subject: [PATCH] Bump to rust-const-random-macro 0.1.15 --- packaging/extern.patch | 16 +++++ packaging/rust-const-random-macro.manifest | 5 ++ packaging/rust-const-random-macro.spec | 73 ++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 packaging/extern.patch create mode 100644 packaging/rust-const-random-macro.manifest create mode 100644 packaging/rust-const-random-macro.spec diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..9cb6ab5 --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,16 @@ +diff --git a/src/lib.rs b/src/lib.rs +index f711a13..882f591 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -1,6 +1,11 @@ + #[allow(unused_extern_crates)] + extern crate proc_macro; + ++extern crate getrandom; ++extern crate once_cell; ++extern crate proc_macro_hack; ++extern crate tiny_keccak; ++ + use proc_macro::*; + use proc_macro_hack::proc_macro_hack; + use std::iter::once; diff --git a/packaging/rust-const-random-macro.manifest b/packaging/rust-const-random-macro.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-const-random-macro.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-const-random-macro.spec b/packaging/rust-const-random-macro.spec new file mode 100644 index 0000000..2099440 --- /dev/null +++ b/packaging/rust-const-random-macro.spec @@ -0,0 +1,73 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate const-random-macro +%global real_crate_name const_random_macro +%global rustc_edition 2018 + +Name: rust-const-random-macro +Version: 0.1.15 +Release: 1 +Summary: Provides the procedural macro used by const-random + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/const-random-macro +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-getrandom +BuildRequires: rust-once_cell +BuildRequires: rust-proc-macro-hack +BuildRequires: rust-tiny-keccak + +Requires: rust-getrandom +Requires: rust-once_cell +Requires: rust-proc-macro-hack +Requires: rust-tiny-keccak + +%description +Provides the procedural macro used by const-random. + +%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}} \ + ./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 -- 2.34.1