/[packages]/updates/5/pcre/current/SPECS/pcre.spec
ViewVC logotype

Contents of /updates/5/pcre/current/SPECS/pcre.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 844508 - (show annotations) (download)
Fri Jun 26 14:20:54 2015 UTC (8 years, 9 months ago) by luigiwalser
File size: 7568 byte(s)
add upstream patch to fix CVE-2015-5073
1 %define pcre_major 1
2 %define pcrecpp_major 0
3 %define pcreposix_major 1
4 %define pcreposix_compat_major 0
5 %define libname_orig lib%{name}
6 %define libname16_orig lib%{name}16
7 %define libname32_orig lib%{name}32
8 %define libname %mklibname pcre %{pcre_major}
9 %define libname16 %mklibname pcre 16 %{pcrecpp_major}
10 %define libname32 %mklibname pcre 32 %{pcrecpp_major}
11 %define libnamecpp %mklibname pcrecpp %{pcrecpp_major}
12 %define libnameposix %mklibname pcreposix %{pcreposix_major}
13 %define libnameposix_compat %mklibname pcreposix %{pcreposix_compat_major}
14 %define develname %mklibname -d pcre
15 %define develcpp %mklibname -d pcrecpp
16 %define develposix %mklibname -d pcreposix
17 %define olddevelname %mklibname %{name} 0 -d
18
19 %define build_pcreposix_compat 1
20
21 Summary: Perl-compatible regular expression library
22 Name: pcre
23 Version: 8.37
24 %define subrel 1
25 Release: %mkrel 2
26 License: BSD-Style
27 Group: File tools
28 URL: http://www.pcre.org/
29 Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
30 Source1: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2.sig
31 Requires: %{libname} = %{version}-%{release}
32 BuildRequires: automake
33 Patch0: pcre-0.6.5-fix-detect-into-kdelibs.patch
34 Patch1: pcre-8.33-linkage-fix.patch
35 Patch2: pcre-8.37-overflows.patch
36 Patch3: pcre-9.37-CVE-2015-5073.patch
37 # from debian:
38 Patch4: pcre-pcreposix-glibc-conflict.patch
39
40
41 %description
42 PCRE has its own native API, but a set of "wrapper" functions that are based on
43 the POSIX API are also supplied in the library libpcreposix. Note that this
44 just provides a POSIX calling interface to PCRE: the regular expressions
45 themselves still follow Perl syntax and semantics.
46 This package contains a grep variant based on the PCRE library.
47
48 %package -n %{libname}
49 Group: System/Libraries
50 Summary: Perl-compatible regular expression library
51 Requires(pre): filesystem >= 2.1.9-18
52 Provides: %{libname_orig} = %{version}-%{release}
53
54 %description -n %{libname}
55 This package contains the shared library libpcre.
56
57 %package -n %{libname16}
58 Group: System/Libraries
59 Summary: Perl-compatible regular expression library
60 Requires(pre): filesystem >= 2.1.9-18
61 Provides: %{libname16_orig} = %{version}-%{release}
62 Obsoletes: %{_lib}pcre16_1 < %{version}-%{release}
63
64 %description -n %{libname16}
65 This package contains the shared library libpcre.
66
67 %package -n %{libname32}
68 Group: System/Libraries
69 Summary: Perl-compatible regular expression library
70 Requires(pre): filesystem >= 2.1.9-18
71 Provides: %{libname32_orig} = %{version}-%{release}
72 Obsoletes: %{_lib}pcre32_1 < %{version}-%{release}
73
74 %description -n %{libname32}
75 This package contains the shared library libpcre.
76
77 %package -n %{libnamecpp}
78 Group: System/Libraries
79 Summary: Perl-compatible regular expression library
80 Conflicts: %{_lib}pcre0 < 8.21-3
81
82 %description -n %{libnamecpp}
83 This package contains the shared library libpcrecpp.
84
85
86 %package -n %{libnameposix}
87 Group: System/Libraries
88 Summary: Perl-compatible regular expression library
89 Conflicts: %{_lib}pcre0 < 8.21-3
90
91 %description -n %{libnameposix}
92 This package contains the shared library libpcreposix.
93
94
95 %package -n %{libnameposix_compat}
96 Group: System/Libraries
97 Summary: Perl-compatible regular expression library
98 Conflicts: %{_lib}pcre0 < 8.21-3
99
100 %description -n %{libnameposix_compat}
101 This package contains the shared library libpcreposix compat.
102
103
104 %package -n %{develname}
105 Group: Development/C
106 Summary: Headers and static lib for pcre development
107 Requires: %{libname} = %{version}-%{release}
108 Requires: %{libname16} = %{version}-%{release}
109 Requires: %{libname32} = %{version}-%{release}
110 Provides: %{libname_orig}-devel = %{version}-%{release}
111 Provides: %{name}-devel = %{version}-%{release}
112 Obsoletes: %{olddevelname} < 8.21-3
113
114 %description -n %{develname}
115 Install this package if you want do compile applications using the pcre
116 library.
117
118 %package -n %{develcpp}
119 Group: Development/C++
120 Summary: Headers and static lib for pcrecpp development
121 Provides: pcrecpp-devel = %{version}-%{release}
122 Requires: %{libnamecpp} = %{version}-%{release}
123 Requires: %{develname} = %{version}-%{release}
124 Conflicts: pcre-devel < 8.32-4
125
126 %description -n %{develcpp}
127 Install this package if you want do compile applications using the pcrecpp
128 library.
129
130 %package -n %{develposix}
131 Group: Development/C
132 Summary: Headers and static lib for pcreposix development
133 Provides: pcreposix-devel = %{version}-%{release}
134 Requires: %{libnameposix} = %{version}-%{release}
135 Requires: %{develname} = %{version}-%{release}
136 Conflicts: pcre-devel < 8.32-4
137
138 %description -n %{develposix}
139 Install this package if you want do compile applications using the pcre
140 library.
141
142 The header file for the POSIX-style functions is called pcreposix.h. The
143 official POSIX name is regex.h, but I didn't want to risk possible problems
144 with existing files of that name by distributing it that way. To use it with an
145 existing program that uses the POSIX API, it will have to be renamed or pointed
146 at by a link.
147
148 %prep
149 %setup -q
150 %patch0 -p1 -b .detect-into-kdelibs
151 %patch1 -p1 -b .linkage-fix
152 %patch2 -p1 -b .overflows
153 %patch3 -p1 -b .CVE-2015-5073
154
155 %if %{build_pcreposix_compat}
156 # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
157 # create a libpcreposix.so.0 without the patch
158 cp -a . ../pcre-with-pcreposix_compat && mv ../pcre-with-pcreposix_compat .
159 %endif
160 %patch4 -p1 -b .symbol-conflict
161
162 %build
163 %if %{build_pcreposix_compat}
164 dirs="pcre-with-pcreposix_compat ."
165 %else
166 dirs="."
167 %endif
168 for i in $dirs; do
169 cd $i
170 mkdir -p m4
171 autoreconf -fi
172 %configure2_5x \
173 --disable-static \
174 --enable-utf \
175 --enable-unicode-properties \
176 --enable-pcre8 \
177 --enable-pcre16 \
178 --enable-pcre32 \
179 --enable-jit
180 %make
181 cd -
182 done
183
184 %check
185 export LC_ALL=C
186 make check
187
188 %install
189 %if %{build_pcreposix_compat}
190 %makeinstall_std -C pcre-with-pcreposix_compat
191 %endif
192 %makeinstall_std
193
194 %multiarch_binaries %{buildroot}%{_bindir}/pcre-config
195
196 # Remove unwanted files
197 rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
198 rm -f %{buildroot}%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt}
199 rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README}
200 rm -rf %{buildroot}%{_docdir}/pcre/html
201 rm -f %{buildroot}%{_libdir}/*.la
202
203 %files
204 %doc AUTHORS COPYING LICENCE NEWS README
205 %{_mandir}/man1/pcregrep.1*
206 %{_mandir}/man1/pcretest.1*
207 %{_bindir}/pcregrep
208 %{_bindir}/pcretest
209
210 %files -n %{libname}
211 %{_libdir}/libpcre.so.%{pcre_major}*
212
213 %files -n %{libname16}
214 %{_libdir}/libpcre16.so.%{pcrecpp_major}*
215
216 %files -n %{libname32}
217 %{_libdir}/libpcre32.so.%{pcrecpp_major}*
218
219 %files -n %{libnamecpp}
220 %{_libdir}/libpcrecpp.so.%{pcrecpp_major}*
221
222 %if %{build_pcreposix_compat}
223 %files -n %{libnameposix_compat}
224 %{_libdir}/libpcreposix.so.%{pcreposix_compat_major}*
225 %endif
226
227 %files -n %{libnameposix}
228 %{_libdir}/libpcreposix.so.%{pcreposix_major}*
229
230 %files -n %{develname}
231 %doc doc/html
232 %doc ChangeLog
233 %{_libdir}/libpcre.so
234 %{_libdir}/libpcre16.so
235 %{_libdir}/libpcre32.so
236 %{_includedir}/pcre.h
237 %{_includedir}/pcre_*.h
238 %{_libdir}/pkgconfig/libpcre.pc
239 %{_libdir}/pkgconfig/libpcre16.pc
240 %{_libdir}/pkgconfig/libpcre32.pc
241 %{_bindir}/pcre-config
242 %multiarch %{multiarch_bindir}/pcre-config
243 %{_mandir}/man1/pcre-config.1*
244 %{_mandir}/man3/*.3*
245 %exclude %{_libdir}/libpcreposix.so
246 %exclude %{_mandir}/man3/pcreposix.3*
247
248 %files -n %{develcpp}
249 %{_includedir}/pcrecpp*.h
250 %{_libdir}/libpcrecpp.so
251 %{_libdir}/pkgconfig/libpcrecpp.pc
252 %{_mandir}/man3/pcrecpp.3*
253
254 %files -n %{develposix}
255 %{_includedir}/pcreposix.h
256 %{_libdir}/libpcreposix.so
257 %{_libdir}/pkgconfig/libpcreposix.pc
258 %{_mandir}/man3/pcreposix.3*

  ViewVC Help
Powered by ViewVC 1.1.30