From 1bcc2a5ada982d13b23b235583ea55376b38ec53 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 22 Mar 2023 14:24:51 +0900 Subject: [PATCH] Bump to rust-tap 1.0.1 --- packaging/extern.patch | 17 ++++++++++++ packaging/rust-tap.manifest | 5 ++++ packaging/rust-tap.spec | 65 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 packaging/extern.patch create mode 100644 packaging/rust-tap.manifest create mode 100644 packaging/rust-tap.spec diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..6cbc607 --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,17 @@ +diff --git a/src/lib.rs b/src/lib.rs +index e6abc40..86f96de 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -128,10 +128,11 @@ implementation, and does nothing else. + [`tap`]: tap/index.html + !*/ + +-#![no_std] + #![cfg_attr(debug_assertions, warn(missing_docs))] + #![cfg_attr(not(debug_assertions), deny(missing_docs))] + ++extern crate std as core; ++ + pub mod conv; + pub mod pipe; + pub mod tap; diff --git a/packaging/rust-tap.manifest b/packaging/rust-tap.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-tap.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-tap.spec b/packaging/rust-tap.spec new file mode 100644 index 0000000..7d7c2fc --- /dev/null +++ b/packaging/rust-tap.spec @@ -0,0 +1,65 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate tap +%global real_crate_name tap +%global rustc_edition 2015 + +Name: rust-tap +Version: 1.0.1 +Release: 1 +Summary: Generic extensions for tapping values in Rust + +License: MIT +URL: https://crates.io/crates/tap +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust + + + +%description +Generic extensions for tapping values in Rust. + +%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}} \ + ./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 -- 2.7.4