2 # - pcreposix subpackage?
5 %bcond_with pcre16 # enable 16 bit character support
6 %bcond_without static_libs # don't build static libraries
7 %bcond_without tests # don't perform "make check"
9 Summary: Perl-Compatible Regular Expression library
10 Summary(pl.UTF-8): Biblioteka perlowych wyrażeń regularnych
11 Summary(pt_BR.UTF-8): Biblioteca de expressões regulares versão
15 License: BSD (see LICENCE)
17 Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
18 # Source0-md5: 5439e321351bddd5533551bbce128d07
19 Patch0: %{name}-pcreposix-glibc-conflict.patch
20 URL: http://www.pcre.org/
21 BuildRequires: autoconf >= 2.57
22 BuildRequires: automake
23 BuildRequires: bzip2-devel
24 BuildRequires: libstdc++-devel
25 BuildRequires: libtool >= 2:2
26 BuildRequires: readline-devel
27 BuildRequires: zlib-devel
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 PCRE stands for the Perl Compatible Regular Expression library. It
33 contains routines to match text against regular expressions similar to
34 Perl's. It also contains a POSIX compatibility library.
36 %description -l es.UTF-8
37 A biblioteca PCRE é um set de funções que implementam expressões
38 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
39 sua própria API nativa, bem como um set de funções wrapper para
40 corresponder ao padrão POSIX de expressões regulares.
42 %description -l pl.UTF-8
43 PCRE (Perl-Compatible Regular Expression) oznacza bibliotekę wyrażeń
44 regularnych kompatybilnych z perlowymi. Zawiera funkcje dopasowujące
45 tekst do wyrażeń regularnych podobnych do tych znanych z Perla.
46 Zawiera także bibliotekę kompatybilną z POSIX.
48 %description -l pt_BR.UTF-8
49 A biblioteca PCRE é um conjunto de funções que implementam expressões
50 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
51 sua própria API nativa, bem como um conjuntos de funções wrapper para
52 corresponder ao padrão POSIX de expressões regulares.
55 Summary: Perl-Compatible Regular Expression header files and development documentation
56 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do bibliotek pcre
57 Summary(pt_BR.UTF-8): Arquivos para desenvolvimento com pcre
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Obsoletes: libpcre0-devel
63 Perl-Compatible Regular Expression header files and development
66 %description devel -l es.UTF-8
67 A biblioteca PCRE é um set de funções que implementam expressões
68 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
69 sua própria API nativa, bem como um set de funções wrapper para
70 corresponder ao padrão POSIX de expressões regulares.
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe i dokumentacja do bibliotek pcre.
75 %description devel -l pt_BR.UTF-8
76 A biblioteca PCRE é um conjunto de funções que implementam expressões
77 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
78 sua própria API nativa, bem como um conjunto de funções wrapper para
79 corresponder ao padrão POSIX de expressões regulares.
82 Summary: Perl-Compatible Regular Expression static libraries
83 Summary(pl.UTF-8): Biblioteki statyczne pcre
84 Summary(pt_BR.UTF-8): Arquivos para desenvolvimento estático com pcre
85 Group: Development/Libraries
86 Requires: %{name}-devel = %{version}-%{release}
89 Perl-Compatible Regular Expression library static libraries.
91 %description static -l es.UTF-8
92 A biblioteca PCRE é um set de funções que implementam expressões
93 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
94 sua própria API nativa, bem como um set de funções wrapper para
95 corresponder ao padrão POSIX de expressões regulares.
97 %description static -l pl.UTF-8
98 Biblioteki statyczne pcre.
100 %description static -l pt_BR.UTF-8
101 A biblioteca PCRE é um conjunto de funções que implementam expressões
102 regulares utilizando-se da mesma sintaxe e semântica do perl 5. Possui
103 sua própria API nativa, bem como um conjunto de funções wrapper para
104 corresponder ao padrão POSIX de expressões regulares.
107 Summary: C++ wrapper to PCRE library
108 Summary(pl.UTF-8): Interfejs C++ do biblioteki PCRE
110 Requires: %{name} = %{version}-%{release}
113 C++ wrapper to PCRE library.
115 %description cxx -l pl.UTF-8
116 Interfejs C++ do biblioteki PCRE.
119 Summary: Header file for C++ wrapper to PCRE library
120 Summary(pl.UTF-8): Plik nagłówkowy interfejsu C++ do biblioteki PCRE
121 Group: Development/Libraries
122 Requires: %{name}-cxx = %{version}-%{release}
123 Requires: %{name}-devel = %{version}-%{release}
124 Requires: libstdc++-devel
126 %description cxx-devel
127 Header file for C++ wrapper to PCRE library.
129 %description cxx-devel -l pl.UTF-8
130 Plik nagłówkowy interfejsu C++ do biblioteki PCRE.
133 Summary: Static version of pcrecpp library
134 Summary(pl.UTF-8): Statyczna wersja biblioteki pcrecpp
135 Group: Development/Libraries
136 Requires: %{name}-cxx-devel = %{version}-%{release}
138 %description cxx-static
139 Static version of pcrecpp library.
141 %description cxx-static -l pl.UTF-8
142 Statyczna wersja biblioteki pcrecpp.
145 Summary: Grep using Perl Compatible Regular Expressions
146 Summary(pl.UTF-8): Grep używający perlowych wyrażeń regularnych
147 Group: Applications/Text
150 %description -n pcregrep
151 pgrep is a grep workalike which uses perl-style regular expressions
152 instead of POSIX regular expressions.
154 %description -n pcregrep -l pl.UTF-8
155 pgrep jest programem działającym podobnie do grepa, ale używających
156 perlowych wyrażeń regularnych, a nie posiksowych.
159 Summary: A program for testing Perl-comaptible regular expressions
160 Summary(pl.UTF-8): Program do testowania kompatybilnych z perlem wyrażeń regularnych
161 Group: Applications/Text
163 %description -n pcretest
164 pcretest is a program which you can use to test regular expression.
166 %description -n pcretest -l pl.UTF-8
167 pcretest jest programem, za pomocą którego można sprawdzić poprawność
168 wyrażenia regularnego.
171 Summary: Documentation for PCRE in HTML format
172 Summary(pl.UTF-8): Dokumentacja dla PCRE w formacie HTML
173 Group: Applications/Text
175 %description doc-html
176 Documentation for PCRE in HTML format.
178 %description doc-html -l pl.UTF-8
179 Dokumentacja dla PCRE w formacie HTML.
192 CXXLDFLAGS="%{rpmldflags}" \
193 --disable-silent-rules \
194 %{!?with_static_libs:--disable-static} \
196 %{?with_pcre16:--enable-pcre16} \
197 --enable-pcregrep-libz \
198 --enable-pcregrep-libbz2 \
199 --enable-pcretest-libreadline \
200 --enable-unicode-properties \
206 # tests need big stack
212 rm -rf $RPM_BUILD_ROOT
213 install -d $RPM_BUILD_ROOT{/%{_lib},%{_examplesdir}/%{name}-%{version}}
216 DESTDIR=$RPM_BUILD_ROOT
218 mv -f $RPM_BUILD_ROOT%{_libdir}/libpcre.so.* $RPM_BUILD_ROOT/%{_lib}
219 mv -f $RPM_BUILD_ROOT%{_libdir}/libpcreposix.so.* $RPM_BUILD_ROOT/%{_lib}
220 %{?with_pcre16:mv -f $RPM_BUILD_ROOT%{_libdir}/libpcre16.so.* $RPM_BUILD_ROOT/%{_lib}}
222 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libpcre.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpcre.so
223 %{?with_pcre16:ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libpcre16.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpcre16.so}
224 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libpcreposix.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpcreposix.so
226 cp -p pcredemo.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
228 rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre
231 rm -rf $RPM_BUILD_ROOT
233 %post -p /sbin/ldconfig
234 %postun -p /sbin/ldconfig
236 %post cxx -p /sbin/ldconfig
237 %postun cxx -p /sbin/ldconfig
240 %defattr(644,root,root,755)
241 %doc README NEWS LICENCE ChangeLog
242 %attr(755,root,root) /%{_lib}/libpcre.so.*.*.*
243 %attr(755,root,root) %ghost /%{_lib}/libpcre.so.1
244 %attr(755,root,root) /%{_lib}/libpcreposix.so.*.*.*
245 %attr(755,root,root) %ghost /%{_lib}/libpcreposix.so.0
247 %attr(755,root,root) /%{_lib}/libpcre16.so.*.*.*
248 %attr(755,root,root) %ghost /%{_lib}/libpcre16.so.0
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{_bindir}/pcre-config
254 %attr(755,root,root) %{_libdir}/libpcre.so
255 %{?with_pcre16:%attr(755,root,root) %{_libdir}/libpcre16.so}
256 %attr(755,root,root) %{_libdir}/libpcreposix.so
257 %{_libdir}/libpcre.la
258 %{?with_pcre16:%{_libdir}/libpcre16.la}
259 %{_libdir}/libpcreposix.la
260 %{_includedir}/pcre.h
261 %{_includedir}/pcreposix.h
262 %{_pkgconfigdir}/libpcre.pc
263 %{?with_pcre16:%{_pkgconfigdir}/libpcre16.pc}
264 %{_pkgconfigdir}/libpcreposix.pc
265 %{_mandir}/man1/pcre-config.1*
266 %{_mandir}/man3/pcre*.3*
267 %exclude %{_mandir}/man3/pcrecpp.3*
268 %{_examplesdir}/%{name}-%{version}
270 %if %{with static_libs}
272 %defattr(644,root,root,755)
274 %{?with_pcre16:%{_libdir}/libpcre16.a}
275 %{_libdir}/libpcreposix.a
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_libdir}/libpcrecpp.so.*.*.*
281 %attr(755,root,root) %ghost %{_libdir}/libpcrecpp.so.0
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_libdir}/libpcrecpp.so
286 %{_libdir}/libpcrecpp.la
287 %{_includedir}/pcrecpp.h
288 %{_includedir}/pcre_scanner.h
289 %{_includedir}/pcre_stringpiece.h
290 %{_includedir}/pcrecpparg.h
291 %{_pkgconfigdir}/libpcrecpp.pc
292 %{_mandir}/man3/pcrecpp.3*
294 %if %{with static_libs}
296 %defattr(644,root,root,755)
297 %{_libdir}/libpcrecpp.a
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{_bindir}/pcregrep
303 %{_mandir}/man1/pcregrep.1*
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_bindir}/pcretest
308 %{_mandir}/man1/pcretest.1*
311 %defattr(644,root,root,755)