Projects
Eulaceura:Mainline
re2-rust
_service:obs_scm:re2-rust.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:re2-rust.spec of Package re2-rust
%global __cargo_skip_build 0 Name: re2-rust Version: 0.1 Release: 5 Summary: rust fast alternative to backtracking RE engines License: MulanPSL-2.0 and BSD URL: https://gitee.com/openeuler/re2-rust Source0: %{name}-%{version}.zip Patch0: optimize-re2-rust.patch ExclusiveArch: x86_64 aarch64 BuildRequires: rust BuildRequires: cargo BuildRequires: rust-packaging BuildRequires: gcc BuildRequires: g++ BuildRequires: make %define _cargo /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 /usr/bin/cargo %description Based on Rust programming language, re2-rust is lightweight, efficient and safe alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. %package devel Summary: Provide re2-rust symbolic links with header files and libraries Requires: %{name} = %{version}-%{release} %description devel This package contains header files and symbolic links to re2-rust's shared libraries. If you want to develop programs using re2-rust, you need to install re2-rust-devel. Summary: %{summary} %prep %autosetup -p1 mv re2 re2-rust cp vendor regex-capi/ -rf cd regex-capi %cargo_prep %cargo_generate_buildrequires %build sed -i '/\[source.crates-io\]/{n;d}' ./regex-capi/.cargo/config sed -i '/\[source.local-registry\]/{n;d}' ./regex-capi/.cargo/config sed -i '/\[source.local-registry\]/a directory = "vendor"' ./regex-capi/.cargo/config %ifarch aarch64 sed -i 's/rustflags = \[/rustflags = \["-Clink-arg=-lgcc", /g' ./regex-capi/.cargo/config %endif cp ./regex-capi/.cargo ./ -rf #%{_cargo} build --release -Z avoid-dev-deps --all --all-features %make_build -j1 includedir=%{_includedir} libdir=%{_libdir} %install %make_install includedir=%{_includedir} libdir=%{_libdir} install -p -m 644 re2.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/re2-rust.pc sed -i -e "s#@includedir@#/usr/include#" $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/re2-rust.pc sed -i -e "s#@libdir@#/usr/lib64#" $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/re2-rust.pc sed -i -e "s/-lre2/-lre2-rust/g" $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/re2-rust.pc %delete_la_and_a %post /sbin/ldconfig %postun /sbin/ldconfig %check make test %files %{_libdir}/libre2-rust.so.* %files devel %{_includedir}/re2-rust %{_libdir}/{libre2-rust.so,pkgconfig/re2-rust.pc} %changelog * Fri Aug 18 2023 gaihuiying <eaglegai@163.com> 0.1-5 - re2-rust optimization * Wed Jul 26 2023 gaihuiying <eaglegai@163.com> 0.1-4 - modify description for re2-rust and remove useless dependencies * Tue Apr 4 2023 gaihuiying <eaglegai@163.com> 0.1-3 - provides pkgconfig(re2) * Wed Dec 7 2022 sunsuwan <sunsuwan3@huawei.com> 0.1-2 - add spec to build rpm
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2