]> git.pld-linux.org Git - packages/pcre.git/blob - pcre.spec
- pcre16 is required by Qt5 - so build it (and pcre32 as well) as subpackages
[packages/pcre.git] / pcre.spec
1 # TODO
2 # - pcreposix subpackage?
3
4 # Conditional build:
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"
9
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
13 Name:           pcre
14 Version:        8.34
15 Release:        2
16 License:        BSD (see LICENCE)
17 Group:          Libraries
18 Source0:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
19 # Source0-md5:  5439e321351bddd5533551bbce128d07
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
29 Obsoletes:      libpcre0
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
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.
36
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.
42
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.
48
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.
54
55 %package devel
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
62
63 %description devel
64 Perl-Compatible Regular Expression header files and development
65 documentation.
66
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.
72
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe i dokumentacja do bibliotek pcre.
75
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.
81
82 %package static
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}
88
89 %description static
90 Perl-Compatible Regular Expression library static libraries.
91
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.
97
98 %description static -l pl.UTF-8
99 Biblioteki statyczne pcre.
100
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.
106
107 %package cxx
108 Summary:        C++ wrapper to PCRE library
109 Summary(pl.UTF-8):      Interfejs C++ do biblioteki PCRE
110 Group:          Libraries
111 Requires:       %{name} = %{version}-%{release}
112
113 %description cxx
114 C++ wrapper to PCRE library.
115
116 %description cxx -l pl.UTF-8
117 Interfejs C++ do biblioteki PCRE.
118
119 %package cxx-devel
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
126
127 %description cxx-devel
128 Header file for C++ wrapper to PCRE library.
129
130 %description cxx-devel -l pl.UTF-8
131 Plik nagłówkowy interfejsu C++ do biblioteki PCRE.
132
133 %package cxx-static
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}
138
139 %description cxx-static
140 Static version of pcrecpp library.
141
142 %description cxx-static -l pl.UTF-8
143 Statyczna wersja biblioteki pcrecpp.
144
145 %package -n pcre16
146 Summary:        PCRE library with 16-bit character support
147 Summary(pl.UTF-8):      Biblioteka PCRE z obsługą znaków 16-bitowych
148 Group:          Libraries
149
150 %description -n pcre16
151 PCRE (Perl compatible regular expressions) C library with 16-bit
152 character support.
153
154 %description -n pcre16 -l pl.UTF-8
155 Biblioteka C PCRE (perlowych wyrażeń regularnych) z obsługą znaków
156 16-bitowych.
157
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}
166
167 %description -n pcre16-devel
168 Development files for PCRE library with 16-bit character support.
169
170 %description -n pcre16-devel -l pl.UTF-8
171 Pliki programistyczne biblioteki PCRE z obsługą znaków 16-bitowych.
172
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}
178
179 %description -n pcre16-static
180 Static PCRE library with 16-bit character support.
181
182 %description -n pcre16-static -l pl.UTF-8
183 Biblioteka statyczna PCRE z obsługą znaków 16-bitowych.
184
185 %package -n pcre32
186 Summary:        PCRE library with 32-bit character support
187 Summary(pl.UTF-8):      Biblioteka PCRE z obsługą znaków 32-bitowych
188 Group:          Libraries
189
190 %description -n pcre32
191 PCRE (Perl compatible regular expressions) C library with 32-bit
192 character support.
193
194 %description -n pcre32 -l pl.UTF-8
195 Biblioteka C PCRE (perlowych wyrażeń regularnych) z obsługą znaków
196 32-bitowych.
197
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}
206
207 %description -n pcre32-devel
208 Development files for PCRE library with 32-bit character support.
209
210 %description -n pcre32-devel -l pl.UTF-8
211 Pliki programistyczne biblioteki PCRE z obsługą znaków 32-bitowych.
212
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}
218
219 %description -n pcre32-static
220 Static PCRE library with 32-bit character support.
221
222 %description -n pcre32-static -l pl.UTF-8
223 Biblioteka statyczna PCRE z obsługą znaków 32-bitowych.
224
225 %package -n pcregrep
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}
230 Obsoletes:      pgrep
231
232 %description -n pcregrep
233 pgrep is a grep workalike which uses perl-style regular expressions
234 instead of POSIX regular expressions.
235
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.
239
240 %package -n pcretest
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}}
247
248 %description -n pcretest
249 pcretest is a program which you can use to test regular expression.
250
251 %description -n pcretest -l pl.UTF-8
252 pcretest jest programem, za pomocą którego można sprawdzić poprawność
253 wyrażenia regularnego.
254
255 %package doc-html
256 Summary:        Documentation for PCRE in HTML format
257 Summary(pl.UTF-8):      Dokumentacja dla PCRE w formacie HTML
258 Group:          Applications/Text
259
260 %description doc-html
261 Documentation for PCRE in HTML format.
262
263 %description doc-html -l pl.UTF-8
264 Dokumentacja dla PCRE w formacie HTML.
265
266 %prep
267 %setup -q
268 %patch0 -p1
269
270 %build
271 %{__libtoolize}
272 %{__aclocal} -I m4
273 %{__autoconf}
274 %{__autoheader}
275 %{__automake}
276 %configure \
277         CXXLDFLAGS="%{rpmldflags}" \
278         --disable-silent-rules \
279         %{!?with_static_libs:--disable-static} \
280         --enable-jit \
281         %{?with_pcre16:--enable-pcre16} \
282         %{?with_pcre32:--enable-pcre32} \
283         --enable-pcregrep-libz \
284         --enable-pcregrep-libbz2 \
285         --enable-pcretest-libreadline \
286         --enable-unicode-properties \
287         --enable-utf8
288
289 %{__make}
290
291 %if %{with tests}
292 # tests need big stack
293 ulimit -s 32768
294 %{__make} -j1 check
295 %endif
296
297 %install
298 rm -rf $RPM_BUILD_ROOT
299 install -d $RPM_BUILD_ROOT{/%{_lib},%{_examplesdir}/%{name}-%{version}}
300
301 %{__make} install \
302         DESTDIR=$RPM_BUILD_ROOT
303
304 mv -f $RPM_BUILD_ROOT%{_libdir}/libpcre.so.* $RPM_BUILD_ROOT/%{_lib}
305 mv -f $RPM_BUILD_ROOT%{_libdir}/libpcreposix.so.* $RPM_BUILD_ROOT/%{_lib}
306
307 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libpcre.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpcre.so
308 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libpcreposix.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpcreposix.so
309
310 cp -p pcredemo.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
311
312 rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre
313
314 %clean
315 rm -rf $RPM_BUILD_ROOT
316
317 %post   -p /sbin/ldconfig
318 %postun -p /sbin/ldconfig
319
320 %post   cxx -p /sbin/ldconfig
321 %postun cxx -p /sbin/ldconfig
322
323 %post   -p pcre16 -p /sbin/ldconfig
324 %postun -p pcre16 -p /sbin/ldconfig
325
326 %post   -p pcre32 -p /sbin/ldconfig
327 %postun -p pcre32 -p /sbin/ldconfig
328
329 %files
330 %defattr(644,root,root,755)
331 %doc AUTHORS ChangeLog LICENCE NEWS README
332 %attr(755,root,root) /%{_lib}/libpcre.so.*.*.*
333 %attr(755,root,root) %ghost /%{_lib}/libpcre.so.1
334 %attr(755,root,root) /%{_lib}/libpcreposix.so.*.*.*
335 %attr(755,root,root) %ghost /%{_lib}/libpcreposix.so.0
336
337 %files devel
338 %defattr(644,root,root,755)
339 %attr(755,root,root) %{_bindir}/pcre-config
340 %attr(755,root,root) %{_libdir}/libpcre.so
341 %attr(755,root,root) %{_libdir}/libpcreposix.so
342 %{_libdir}/libpcre.la
343 %{_libdir}/libpcreposix.la
344 %{_includedir}/pcre.h
345 %{_includedir}/pcreposix.h
346 %{_pkgconfigdir}/libpcre.pc
347 %{_pkgconfigdir}/libpcreposix.pc
348 %{_mandir}/man1/pcre-config.1*
349 %{_mandir}/man3/pcre.3*
350 %{_mandir}/man3/pcre_*.3*
351 %{_mandir}/man3/pcreapi.3*
352 %{_mandir}/man3/pcrebuild.3*
353 %{_mandir}/man3/pcrecallout.3*
354 %{_mandir}/man3/pcredemo.3*
355 %{_mandir}/man3/pcrejit.3*
356 %{_mandir}/man3/pcrelimits.3*
357 %{_mandir}/man3/pcrematching.3*
358 %{_mandir}/man3/pcrepartial.3*
359 %{_mandir}/man3/pcrepattern.3*
360 %{_mandir}/man3/pcreperform.3*
361 %{_mandir}/man3/pcreposix.3*
362 %{_mandir}/man3/pcreprecompile.3*
363 %{_mandir}/man3/pcresample.3*
364 %{_mandir}/man3/pcrestack.3*
365 %{_mandir}/man3/pcresyntax.3*
366 %{_mandir}/man3/pcreunicode.3*
367 %{_examplesdir}/%{name}-%{version}
368
369 %if %{with static_libs}
370 %files static
371 %defattr(644,root,root,755)
372 %{_libdir}/libpcre.a
373 %{_libdir}/libpcreposix.a
374 %endif
375
376 %files cxx
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_libdir}/libpcrecpp.so.*.*.*
379 %attr(755,root,root) %ghost %{_libdir}/libpcrecpp.so.0
380
381 %files cxx-devel
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_libdir}/libpcrecpp.so
384 %{_libdir}/libpcrecpp.la
385 %{_includedir}/pcrecpp.h
386 %{_includedir}/pcre_scanner.h
387 %{_includedir}/pcre_stringpiece.h
388 %{_includedir}/pcrecpparg.h
389 %{_pkgconfigdir}/libpcrecpp.pc
390 %{_mandir}/man3/pcrecpp.3*
391
392 %if %{with static_libs}
393 %files cxx-static
394 %defattr(644,root,root,755)
395 %{_libdir}/libpcrecpp.a
396 %endif
397
398 %if %{with pcre16}
399 %files -n pcre16
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_libdir}/libpcre16.so.*.*.*
402 %attr(755,root,root) %ghost %{_libdir}/libpcre16.so.0
403
404 %files -n pcre16-devel
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_libdir}/libpcre16.so
407 %{_libdir}/libpcre16.la
408 %{_pkgconfigdir}/libpcre16.pc
409 %{_mandir}/man3/pcre16.3*
410 %{_mandir}/man3/pcre16_*.3*
411
412 %if %{with static_libs}
413 %files -n pcre16-static
414 %defattr(644,root,root,755)
415 %{_libdir}/libpcre16.a
416 %endif
417 %endif
418
419 %if %{with pcre32}
420 %files -n pcre32
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_libdir}/libpcre32.so.*.*.*
423 %attr(755,root,root) %ghost %{_libdir}/libpcre32.so.0
424
425 %files -n pcre32-devel
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/libpcre32.so
428 %{_libdir}/libpcre32.la
429 %{_pkgconfigdir}/libpcre32.pc
430 %{_mandir}/man3/pcre32.3*
431 %{_mandir}/man3/pcre32_*.3*
432
433 %if %{with static_libs}
434 %files -n pcre32-static
435 %defattr(644,root,root,755)
436 %{_libdir}/libpcre32.a
437 %endif
438 %endif
439
440 %files -n pcregrep
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_bindir}/pcregrep
443 %{_mandir}/man1/pcregrep.1*
444
445 %files -n pcretest
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_bindir}/pcretest
448 %{_mandir}/man1/pcretest.1*
449
450 %files doc-html
451 %defattr(644,root,root,755)
452 %doc doc/html/*
This page took 0.084731 seconds and 4 git commands to generate.