diff --git a/0099-copy-dir.sh.patch b/0099-copy-dir.sh.patch new file mode 100644 index 0000000000000000000000000000000000000000..56d4ed0787bb28c18c581d3159d5a458d9540f9c --- /dev/null +++ b/0099-copy-dir.sh.patch @@ -0,0 +1,38 @@ +From 8d777d20ac3d82434c3f1cbd9cdee94c4de8f966 Mon Sep 17 00:00:00 2001 +From: fu_changjie +Date: Fri, 11 Dec 2020 10:28:08 +0800 +Subject: [PATCH] copy-dir.sh + +--- + copy-dir.sh | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + create mode 100755 copy-dir.sh + +diff --git a/copy-dir.sh b/copy-dir.sh +new file mode 100755 +index 0000000..b5520d5 +--- /dev/null ++++ b/copy-dir.sh +@@ -0,0 +1,19 @@ ++dirname=$(basename `pwd`) ++time=$(date +%s) ++ ++cd .. ++ ++if [[ -f 'asan' || -d 'asan' ]]; then ++ mv asan asan-${time} ++fi ++ ++if [[ -f 'debug' || -d 'debug' ]]; then ++ mv debug debug-${time} ++fi ++ ++cp -a ${dirname} asan ++cp -a ${dirname} debug ++ ++mv asan debug ${dirname} ++ ++cd - +-- +2.27.0 + diff --git a/openresty-pcre.spec b/openresty-pcre.spec new file mode 100644 index 0000000000000000000000000000000000000000..e481c39e6fee1cfccfa931c87b57cf6fd281fa11 --- /dev/null +++ b/openresty-pcre.spec @@ -0,0 +1,135 @@ +Name: openresty-pcre +Version: 8.44 +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 8.42-1 +- Package init with openresty-pcre 8.42, without disable asan diff --git a/openresty-pcre.yaml b/openresty-pcre.yaml new file mode 100644 index 0000000000000000000000000000000000000000..00bbaf050db91e87f0ad529e5c29027a1bf150ae --- /dev/null +++ b/openresty-pcre.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: NA +tag_prefix: NA +seperator: NA diff --git a/pcre-8.44.tar.bz2 b/pcre-8.44.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..dc978b77a7bbf2aff58e69a446388adeecaadee7 Binary files /dev/null and b/pcre-8.44.tar.bz2 differ