2 # - pcreposix subpackage?
5 %bcond_without pcre16 # 16-bit character support
6 %bcond_without pcre32 # 32-bit character support
7 %bcond_without static_libs # static libraries build
8 %bcond_without tests # don't perform "make check"
10 Summary: Perl-Compatible Regular Expression library
11 Summary(pl.UTF-8): Biblioteka perlowych wyrażeń regularnych
12 Summary(pt_BR.UTF-8): Biblioteca de expressões regulares versão
16 License: BSD (see LICENCE)
18 Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
19 # Source0-md5: e3fca7650a0556a2647821679d81f585
20 Patch0: %{name}-pcreposix-glibc-conflict.patch
21 URL: http://www.pcre.org/
22 BuildRequires: autoconf >= 2.57
23 BuildRequires: automake
24 BuildRequires: bzip2-devel
25 BuildRequires: libstdc++-devel
26 BuildRequires: libtool >= 2:2
27 BuildRequires: readline-devel
28 BuildRequires: zlib-devel
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 PCRE stands for the Perl Compatible Regular Expression library. It
34 contains routines to match text against regular expressions similar to
35 Perl's. It also contains a POSIX compatibility library.
37 %description -l es.UTF-8
38 A biblioteca PCRE é um set de funções que implementam expressões
39 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
40 sua própria API nativa, bem como um set de funções wrapper para
41 corresponder ao padrão POSIX de expressões regulares.
43 %description -l pl.UTF-8
44 PCRE (Perl-Compatible Regular Expression) oznacza bibliotekę wyrażeń
45 regularnych kompatybilnych z perlowymi. Zawiera funkcje dopasowujące
46 tekst do wyrażeń regularnych podobnych do tych znanych z Perla.
47 Zawiera także bibliotekę kompatybilną z POSIX.
49 %description -l pt_BR.UTF-8
50 A biblioteca PCRE é um conjunto de funções que implementam expressões
51 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
52 sua própria API nativa, bem como um conjuntos de funções wrapper para
53 corresponder ao padrão POSIX de expressões regulares.
56 Summary: Perl-Compatible Regular Expression header files and development documentation
57 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do bibliotek pcre
58 Summary(pt_BR.UTF-8): Arquivos para desenvolvimento com pcre
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
61 Obsoletes: libpcre0-devel
64 Perl-Compatible Regular Expression header files and development
67 %description devel -l es.UTF-8
68 A biblioteca PCRE é um set de funções que implementam expressões
69 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
70 sua própria API nativa, bem como um set de funções wrapper para
71 corresponder ao padrão POSIX de expressões regulares.
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe i dokumentacja do bibliotek pcre.
76 %description devel -l pt_BR.UTF-8
77 A biblioteca PCRE é um conjunto de funções que implementam expressões
78 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
79 sua própria API nativa, bem como um conjunto de funções wrapper para
80 corresponder ao padrão POSIX de expressões regulares.
83 Summary: Perl-Compatible Regular Expression static libraries
84 Summary(pl.UTF-8): Biblioteki statyczne pcre
85 Summary(pt_BR.UTF-8): Arquivos para desenvolvimento estático com pcre
86 Group: Development/Libraries
87 Requires: %{name}-devel = %{version}-%{release}
90 Perl-Compatible Regular Expression library static libraries.
92 %description static -l es.UTF-8
93 A biblioteca PCRE é um set de funções que implementam expressões
94 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
95 sua própria API nativa, bem como um set de funções wrapper para
96 corresponder ao padrão POSIX de expressões regulares.
98 %description static -l pl.UTF-8
99 Biblioteki statyczne pcre.
101 %description static -l pt_BR.UTF-8
102 A biblioteca PCRE é um conjunto de funções que implementam expressões
103 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
104 sua própria API nativa, bem como um conjunto de funções wrapper para
105 corresponder ao padrão POSIX de expressões regulares.
108 Summary: C++ wrapper to PCRE library
109 Summary(pl.UTF-8): Interfejs C++ do biblioteki PCRE
111 Requires: %{name} = %{version}-%{release}
114 C++ wrapper to PCRE library.
116 %description cxx -l pl.UTF-8
117 Interfejs C++ do biblioteki PCRE.
120 Summary: Header file for C++ wrapper to PCRE library
121 Summary(pl.UTF-8): Plik nagłówkowy interfejsu C++ do biblioteki PCRE
122 Group: Development/Libraries
123 Requires: %{name}-cxx = %{version}-%{release}
124 Requires: %{name}-devel = %{version}-%{release}
125 Requires: libstdc++-devel
127 %description cxx-devel
128 Header file for C++ wrapper to PCRE library.
130 %description cxx-devel -l pl.UTF-8
131 Plik nagłówkowy interfejsu C++ do biblioteki PCRE.
134 Summary: Static version of pcrecpp library
135 Summary(pl.UTF-8): Statyczna wersja biblioteki pcrecpp
136 Group: Development/Libraries
137 Requires: %{name}-cxx-devel = %{version}-%{release}
139 %description cxx-static
140 Static version of pcrecpp library.
142 %description cxx-static -l pl.UTF-8
143 Statyczna wersja biblioteki pcrecpp.
146 Summary: PCRE library with 16-bit character support
147 Summary(pl.UTF-8): Biblioteka PCRE z obsługą znaków 16-bitowych
150 %description -n pcre16
151 PCRE (Perl compatible regular expressions) C library with 16-bit
154 %description -n pcre16 -l pl.UTF-8
155 Biblioteka C PCRE (perlowych wyrażeń regularnych) z obsługą znaków
158 %package -n pcre16-devel
159 Summary: Development files for PCRE library with 16-bit character support
160 Summary(pl.UTF-8): Pliki programistyczne biblioteki PCRE z obsługą znaków 16-bitowych
161 Group: Development/Libraries
162 # base devel required for (common) headers and man page contents;
163 # pulling base pcre doesn't hurt, as it's already required by some basic packages
164 Requires: %{name}-devel = %{version}-%{release}
165 Requires: pcre16 = %{version}-%{release}
167 %description -n pcre16-devel
168 Development files for PCRE library with 16-bit character support.
170 %description -n pcre16-devel -l pl.UTF-8
171 Pliki programistyczne biblioteki PCRE z obsługą znaków 16-bitowych.
173 %package -n pcre16-static
174 Summary: Static PCRE library with 16-bit character support
175 Summary(pl.UTF-8): Biblioteka statyczna PCRE z obsługą znaków 16-bitowych
176 Group: Development/Libraries
177 Requires: pcre16-devel = %{version}-%{release}
179 %description -n pcre16-static
180 Static PCRE library with 16-bit character support.
182 %description -n pcre16-static -l pl.UTF-8
183 Biblioteka statyczna PCRE z obsługą znaków 16-bitowych.
186 Summary: PCRE library with 32-bit character support
187 Summary(pl.UTF-8): Biblioteka PCRE z obsługą znaków 32-bitowych
190 %description -n pcre32
191 PCRE (Perl compatible regular expressions) C library with 32-bit
194 %description -n pcre32 -l pl.UTF-8
195 Biblioteka C PCRE (perlowych wyrażeń regularnych) z obsługą znaków
198 %package -n pcre32-devel
199 Summary: Development files for PCRE library with 32-bit character support
200 Summary(pl.UTF-8): Pliki programistyczne biblioteki PCRE z obsługą znaków 32-bitowych
201 Group: Development/Libraries
202 # base devel required for (common) headers and man page contents;
203 # pulling base pcre doesn't hurt, as it's already required by some basic packages
204 Requires: %{name}-devel = %{version}-%{release}
205 Requires: pcre32 = %{version}-%{release}
207 %description -n pcre32-devel
208 Development files for PCRE library with 32-bit character support.
210 %description -n pcre32-devel -l pl.UTF-8
211 Pliki programistyczne biblioteki PCRE z obsługą znaków 32-bitowych.
213 %package -n pcre32-static
214 Summary: Static PCRE library with 32-bit character support
215 Summary(pl.UTF-8): Biblioteka statyczna PCRE z obsługą znaków 32-bitowych
216 Group: Development/Libraries
217 Requires: pcre32-devel = %{version}-%{release}
219 %description -n pcre32-static
220 Static PCRE library with 32-bit character support.
222 %description -n pcre32-static -l pl.UTF-8
223 Biblioteka statyczna PCRE z obsługą znaków 32-bitowych.
226 Summary: Grep using Perl Compatible Regular Expressions
227 Summary(pl.UTF-8): Grep używający perlowych wyrażeń regularnych
228 Group: Applications/Text
229 Requires: %{name} = %{version}-%{release}
232 %description -n pcregrep
233 pgrep is a grep workalike which uses perl-style regular expressions
234 instead of POSIX regular expressions.
236 %description -n pcregrep -l pl.UTF-8
237 pgrep jest programem działającym podobnie do grepa, ale używających
238 perlowych wyrażeń regularnych, a nie posiksowych.
241 Summary: A program for testing Perl-compatible regular expressions
242 Summary(pl.UTF-8): Program do testowania kompatybilnych z perlem wyrażeń regularnych
243 Group: Applications/Text
244 Requires: %{name} = %{version}-%{release}
245 %{?with_pcre16:Requires: pcre16 = %{version}-%{release}}
246 %{?with_pcre32:Requires: pcre32 = %{version}-%{release}}
248 %description -n pcretest
249 pcretest is a program which you can use to test regular expression.
251 %description -n pcretest -l pl.UTF-8
252 pcretest jest programem, za pomocą którego można sprawdzić poprawność
253 wyrażenia regularnego.
256 Summary: Documentation for PCRE in HTML format
257 Summary(pl.UTF-8): Dokumentacja dla PCRE w formacie HTML
258 Group: Applications/Text
260 %description doc-html
261 Documentation for PCRE in HTML format.
263 %description doc-html -l pl.UTF-8
264 Dokumentacja dla PCRE w formacie HTML.
277 CXXLDFLAGS="%{rpmldflags}" \
278 --disable-silent-rules \
279 %{!?with_static_libs:--disable-static} \
283 %{?with_pcre16:--enable-pcre16} \
284 %{?with_pcre32:--enable-pcre32} \
285 --enable-pcregrep-libz \
286 --enable-pcregrep-libbz2 \
287 --enable-pcretest-libreadline \
288 --enable-unicode-properties \
294 # tests need big stack
300 rm -rf $RPM_BUILD_ROOT
301 install -d $RPM_BUILD_ROOT{/%{_lib},%{_examplesdir}/%{name}-%{version}}
304 DESTDIR=$RPM_BUILD_ROOT
306 mv -f $RPM_BUILD_ROOT%{_libdir}/libpcre.so.* $RPM_BUILD_ROOT/%{_lib}
307 mv -f $RPM_BUILD_ROOT%{_libdir}/libpcreposix.so.* $RPM_BUILD_ROOT/%{_lib}
309 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libpcre.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpcre.so
310 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libpcreposix.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpcreposix.so
312 cp -p pcredemo.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
314 rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre
317 rm -rf $RPM_BUILD_ROOT
319 %post -p /sbin/ldconfig
320 %postun -p /sbin/ldconfig
322 %post cxx -p /sbin/ldconfig
323 %postun cxx -p /sbin/ldconfig
325 %post -n pcre16 -p /sbin/ldconfig
326 %postun -n pcre16 -p /sbin/ldconfig
328 %post -n pcre32 -p /sbin/ldconfig
329 %postun -n pcre32 -p /sbin/ldconfig
332 %defattr(644,root,root,755)
333 %doc AUTHORS ChangeLog LICENCE NEWS README
334 %attr(755,root,root) /%{_lib}/libpcre.so.*.*.*
335 %attr(755,root,root) %ghost /%{_lib}/libpcre.so.1
336 %attr(755,root,root) /%{_lib}/libpcreposix.so.*.*.*
337 %attr(755,root,root) %ghost /%{_lib}/libpcreposix.so.0
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_bindir}/pcre-config
342 %attr(755,root,root) %{_libdir}/libpcre.so
343 %attr(755,root,root) %{_libdir}/libpcreposix.so
344 %{_libdir}/libpcre.la
345 %{_libdir}/libpcreposix.la
346 %{_includedir}/pcre.h
347 %{_includedir}/pcreposix.h
348 %{_pkgconfigdir}/libpcre.pc
349 %{_pkgconfigdir}/libpcreposix.pc
350 %{_mandir}/man1/pcre-config.1*
351 %{_mandir}/man3/pcre.3*
352 %{_mandir}/man3/pcre_*.3*
353 %{_mandir}/man3/pcreapi.3*
354 %{_mandir}/man3/pcrebuild.3*
355 %{_mandir}/man3/pcrecallout.3*
356 %{_mandir}/man3/pcrecompat.3*
357 %{_mandir}/man3/pcredemo.3*
358 %{_mandir}/man3/pcrejit.3*
359 %{_mandir}/man3/pcrelimits.3*
360 %{_mandir}/man3/pcrematching.3*
361 %{_mandir}/man3/pcrepartial.3*
362 %{_mandir}/man3/pcrepattern.3*
363 %{_mandir}/man3/pcreperform.3*
364 %{_mandir}/man3/pcreposix.3*
365 %{_mandir}/man3/pcreprecompile.3*
366 %{_mandir}/man3/pcresample.3*
367 %{_mandir}/man3/pcrestack.3*
368 %{_mandir}/man3/pcresyntax.3*
369 %{_mandir}/man3/pcreunicode.3*
370 %{_examplesdir}/%{name}-%{version}
372 %if %{with static_libs}
374 %defattr(644,root,root,755)
376 %{_libdir}/libpcreposix.a
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_libdir}/libpcrecpp.so.*.*.*
382 %attr(755,root,root) %ghost %{_libdir}/libpcrecpp.so.0
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_libdir}/libpcrecpp.so
387 %{_libdir}/libpcrecpp.la
388 %{_includedir}/pcrecpp.h
389 %{_includedir}/pcre_scanner.h
390 %{_includedir}/pcre_stringpiece.h
391 %{_includedir}/pcrecpparg.h
392 %{_pkgconfigdir}/libpcrecpp.pc
393 %{_mandir}/man3/pcrecpp.3*
395 %if %{with static_libs}
397 %defattr(644,root,root,755)
398 %{_libdir}/libpcrecpp.a
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/libpcre16.so.*.*.*
405 %attr(755,root,root) %ghost %{_libdir}/libpcre16.so.0
407 %files -n pcre16-devel
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_libdir}/libpcre16.so
410 %{_libdir}/libpcre16.la
411 %{_pkgconfigdir}/libpcre16.pc
412 %{_mandir}/man3/pcre16.3*
413 %{_mandir}/man3/pcre16_*.3*
415 %if %{with static_libs}
416 %files -n pcre16-static
417 %defattr(644,root,root,755)
418 %{_libdir}/libpcre16.a
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_libdir}/libpcre32.so.*.*.*
426 %attr(755,root,root) %ghost %{_libdir}/libpcre32.so.0
428 %files -n pcre32-devel
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/libpcre32.so
431 %{_libdir}/libpcre32.la
432 %{_pkgconfigdir}/libpcre32.pc
433 %{_mandir}/man3/pcre32.3*
434 %{_mandir}/man3/pcre32_*.3*
436 %if %{with static_libs}
437 %files -n pcre32-static
438 %defattr(644,root,root,755)
439 %{_libdir}/libpcre32.a
444 %defattr(644,root,root,755)
445 %attr(755,root,root) %{_bindir}/pcregrep
446 %{_mandir}/man1/pcregrep.1*
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_bindir}/pcretest
451 %{_mandir}/man1/pcretest.1*
454 %defattr(644,root,root,755)