From d228883094a149bfc01f680f310fec16cb93505c Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 3 Apr 2023 14:49:24 +0900 Subject: [PATCH] Bump to rust-base64ct 1.6.0 --- packaging/extern.patch | 10 +++++ packaging/rust-base64ct.manifest | 5 +++ packaging/rust-base64ct.spec | 75 ++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 packaging/extern.patch create mode 100644 packaging/rust-base64ct.manifest create mode 100644 packaging/rust-base64ct.spec diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..04e6b5b --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,10 @@ +diff --git a/src/lib.rs b/src/lib.rs +index f1094f9..505f8eb 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -1,4 +1,4 @@ +-#![no_std] ++ + #![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![doc( + html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg", diff --git a/packaging/rust-base64ct.manifest b/packaging/rust-base64ct.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-base64ct.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-base64ct.spec b/packaging/rust-base64ct.spec new file mode 100644 index 0000000..8444398 --- /dev/null +++ b/packaging/rust-base64ct.spec @@ -0,0 +1,75 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate base64ct +%global real_crate_name base64ct +%global rustc_edition 2021 + +Name: rust-base64ct +Version: 1.6.0 +Release: 1 +Summary: Pure Rust implementation of Base64 (RFC 4648) which avoids any usages of data-dependent branches/LUTs and thereby provides portable "best effort" constant-time operation and embedded-friendly no_std support + +License: Apache-2.0 OR MIT +URL: https://crates.io/crates/base64ct +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-base64 +# BuildRequires: rust-proptest + + +%description +Pure Rust implementation of Base64 (RFC 4648) which avoids any usages of data- +dependent branches/LUTs and thereby provides portable "best effort" constant- +time operation and embedded-friendly no_std support. + +%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}} \ + --cfg='feature="std"' \ + --cfg='feature="alloc"' \ + ./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