/
openresty-pcre.spec
122 lines (85 loc) · 2.87 KB
/
openresty-pcre.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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://sourceforge.net/projects/pcre/files/pcre/%{version}/pcre-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ccache, libtool
AutoReqProv: no
%define pcre_prefix /usr/local/openresty/pcre
%description
Perl-compatible regular expression library for use by OpenResty ONLY
%if 0%{?suse_version}
%debug_package
%else
# Remove source code from debuginfo package.
%define __debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"; \
rm -rf "${RPM_BUILD_ROOT}/usr/src/debug"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/pcre-%{version}"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/tmp"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/builddir"; \
%{nil}
%endif
%if 0%{?fedora} >= 27
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%if 0%{?rhel} >= 8
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%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
%prep
%setup -q -n pcre-%{version}
%build
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 -j`nproc` V=1 > /dev/stderr
%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
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%dir %{pcre_prefix}
%dir %{pcre_prefix}/lib
%{pcre_prefix}/lib/*.so*
%files devel
%dir %{pcre_prefix}/include
%defattr(-,root,root,-)
%{pcre_prefix}/lib/*.a
%{pcre_prefix}/include/*.h
%changelog
* Wed Jan 26 2022 Yichun Zhang (agentzh) 8.45-1
- upgraded PCRE to 8.45.
* Mon May 14 2018 Yichun Zhang (agentzh) 8.42-1
- upgraded openresty-pcre to 8.42.
* Thu Nov 2 2017 Yichun Zhang (agentzh)
- upgraded PCRE to 8.41.
* Sun Mar 19 2017 Yichun Zhang (agentzh)
- upgraded PCRE to 8.40.
* Sat Sep 24 2016 Yichun Zhang
- disable the C++ support in build. thanks luto.
* Tue Aug 23 2016 zxcvbn4038
- initial build for pcre 8.39.