/[packages]/cauldron/pcre/current/SPECS/pcre.spec
ViewVC logotype

Annotation of /cauldron/pcre/current/SPECS/pcre.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30