diff options
author | Woohyun Jung <wh0705.jung@samsung.com> | 2023-03-14 10:24:09 +0900 |
---|---|---|
committer | Woohyun Jung <wh0705.jung@samsung.com> | 2023-03-14 10:24:09 +0900 |
commit | d097857bdbb370694ff609749a37b7135460eff6 (patch) | |
tree | e67f5adcbcab487bfd70f0a0a71e5c3eacb4c8c1 | |
parent | a151af332dbb6857820698e763afee875dc74d97 (diff) | |
download | rust-aho-corasick-d097857bdbb370694ff609749a37b7135460eff6.tar.gz rust-aho-corasick-d097857bdbb370694ff609749a37b7135460eff6.tar.bz2 rust-aho-corasick-d097857bdbb370694ff609749a37b7135460eff6.zip |
Bump to rust-aho-corasick 0.7.20
-rw-r--r-- | packaging/extern.patch | 14 | ||||
-rw-r--r-- | packaging/rust-aho-corasick.manifest | 5 | ||||
-rw-r--r-- | packaging/rust-aho-corasick.spec | 68 |
3 files changed, 87 insertions, 0 deletions
diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..be8e0dd --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,14 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 4465a56..ce5bf3c 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -181,6 +181,9 @@ disabled via + + #![deny(missing_docs)] + ++extern crate std; ++extern crate memchr; ++ + // We can never be truly no_std, but we could be alloc-only some day, so + // require the std feature for now. + #[cfg(not(feature = "std"))] diff --git a/packaging/rust-aho-corasick.manifest b/packaging/rust-aho-corasick.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-aho-corasick.manifest @@ -0,0 +1,5 @@ +<manifest> + <request> + <domain name="_"/> + </request> +</manifest> diff --git a/packaging/rust-aho-corasick.spec b/packaging/rust-aho-corasick.spec new file mode 100644 index 0000000..fc6e778 --- /dev/null +++ b/packaging/rust-aho-corasick.spec @@ -0,0 +1,68 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate aho-corasick +%global real_crate_name aho_corasick +%global rustc_edition 2018 + +Name: rust-aho-corasick +Version: 0.7.20 +Release: 1 +Summary: Fast multiple substring searching + +License: Unlicense OR MIT +URL: https://crates.io/crates/aho-corasick +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-memchr +Requires: rust-memchr + +%description +Fast multiple substring searching. + +%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"' \ + --extern memchr=%{_rust_dylibdir}/libmemchr.so \ + ./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 UNLICENSE +%license LICENSE-MIT +%{_rust_dylibdir}/lib%{real_crate_name}.so |