1 Star 0 Fork 14

yinxx/openresty-pcre

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
openresty-pcre.spec 3.40 KB
一键复制 编辑 原始数据 按行查看 历史
yinxx 提交于 2022-07-27 22:12 . back spec
Name: openresty-pcre
Version: 8.45
Release: 1%{?dist}
Summary: Perl-compatible regular expression library for OpenResty
Group: System Environment/Libraries
License: BSD
URL: http://www.pcre.org/
Source0: https://ftp.pcre.org/pub/pcre/pcre-%{version}.tar.bz2
Patch99: 0099-copy-dir.sh.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ccache, libtool, gcc, binutils
AutoReqProv: no
%define pcre_prefix /usr/local/openresty/pcre
%define pcre_prefix_asan /usr/local/openresty-asan/pcre
%description
Perl-compatible regular expression library for use by OpenResty ONLY
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Development files for Perl-compatible regular expression library for use by OpenResty ONLY
%package asan
Summary: Clang AddressSanitizer version of the Perl-compatible regular expression library for OpenResty
Group: System Environment/Libraries
BuildRequires: libasan, ccache, libtool, clang, compiler-rt
AutoReqProv: no
%description asan
Perl-compatible regular expression library for use by OpenResty ONLY.
This is the clang AddressSanitizer version.
%package asan-devel
Summary: Development files for openresty-pcre-asan
Group: Development/Libraries
Requires: openresty-pcre-asan = %{version}-%{release}
%description asan-devel
Development files for Perl-compatible regular expression library for use by OpenResty ONLY.
This is the clang AddressSanitizer version.
%prep
%setup -q -n pcre-%{version}
%patch99 -p1
%build
bash ./copy-dir.sh
export CC="ccache gcc -fdiagnostics-color=always"
./configure \
--prefix=%{pcre_prefix} \
--libdir=%{pcre_prefix}/lib \
--disable-cpp \
--enable-jit \
--enable-utf \
--enable-unicode-properties
make %{?_smp_mflags} V=1
cd asan
export CC="ccache gcc -fdiagnostics-color=always"
./configure \
--prefix=%{pcre_prefix_asan} \
--libdir=%{pcre_prefix_asan}/lib \
--disable-cpp \
--enable-jit \
--enable-utf \
--enable-unicode-properties
make %{?_smp_mflags} V=1
cd -
%install
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}/%{pcre_prefix}/bin
rm -rf %{buildroot}/%{pcre_prefix}/share
rm -f %{buildroot}/%{pcre_prefix}/lib/*.la
rm -f %{buildroot}/%{pcre_prefix}/lib/*pcrecpp*
rm -f %{buildroot}/%{pcre_prefix}/lib/*pcreposix*
rm -rf %{buildroot}/%{pcre_prefix}/lib/pkgconfig
cd asan
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}/%{pcre_prefix_asan}/bin
rm -rf %{buildroot}/%{pcre_prefix_asan}/share
rm -f %{buildroot}/%{pcre_prefix_asan}/lib/*.la
rm -f %{buildroot}/%{pcre_prefix_asan}/lib/*pcrecpp*
rm -f %{buildroot}/%{pcre_prefix_asan}/lib/*pcreposix*
rm -rf %{buildroot}/%{pcre_prefix_asan}/lib/pkgconfig
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{pcre_prefix}/lib/*.so*
%files devel
%defattr(-,root,root,-)
%{pcre_prefix}/lib/*.a
%{pcre_prefix}/include/*.h
%files asan
%defattr(-,root,root,-)
%{pcre_prefix_asan}/lib/*.so*
%files asan-devel
%defattr(-,root,root,-)
%{pcre_prefix_asan}/lib/*.a
%{pcre_prefix_asan}/include/*.h
%changelog
* Thu Jul 22 2021 Fu Changjie <fu_changjie@qq.com> 8.42-1
- Package init with openresty-pcre 8.42, without disable asan
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yinxx/openresty-pcre.git
git@gitee.com:yinxx/openresty-pcre.git
yinxx
openresty-pcre
openresty-pcre
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385