From 69c92b9defde3c74a3a0782bbdd49e25a17d7a39 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 8 Mar 2023 10:10:47 +0900 Subject: [PATCH] Bump to rust-heck 0.4.1 --- packaging/extern.patch | 13 +++++++++ packaging/rust-heck.manifest | 5 ++++ packaging/rust-heck.spec | 68 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 packaging/extern.patch create mode 100644 packaging/rust-heck.manifest create mode 100644 packaging/rust-heck.spec diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..8917cde --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 49bfb0e..5cd510b 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -41,6 +41,8 @@ + #![deny(missing_docs)] + #![forbid(unsafe_code)] + ++extern crate unicode_segmentation; ++ + mod kebab; + mod lower_camel; + mod shouty_kebab; diff --git a/packaging/rust-heck.manifest b/packaging/rust-heck.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-heck.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-heck.spec b/packaging/rust-heck.spec new file mode 100644 index 0000000..e9afffa --- /dev/null +++ b/packaging/rust-heck.spec @@ -0,0 +1,68 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate heck +%global real_crate_name heck +%global rustc_edition 2018 + +Name: rust-heck +Version: 0.4.1 +Release: 1 +Summary: Case conversion library + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/heck +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-unicode-segmentation + + + +%description +Case conversion library. + +%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="unicode"' \ + ./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.7.4