-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpcre2.spec
412 lines (333 loc) · 11.6 KB
/
pcre2.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
#
# Conditional build:
%bcond_without pcre8 # 8-bit character support
%bcond_without pcre16 # 16-bit character support
%bcond_without pcre32 # 32-bit character support
%bcond_without static_libs # static libraries build
%bcond_without tests # don't perform "make check"
Summary: Perl-Compatible Regular Expression library
Summary(pl.UTF-8): Biblioteka perlowych wyrażeń regularnych
Summary(pt_BR.UTF-8): Biblioteca de expressões regulares versão
Name: pcre2
Version: 10.45
Release: 1
License: BSD (see LICENCE)
Group: Libraries
Source0: https://github.com/PhilipHazel/pcre2/releases/download/pcre2-%{version}/%{name}-%{version}.tar.bz2
# Source0-md5: f71abbe1b5adf25cd9af5d26ef223b66
URL: http://www.pcre.org/
BuildRequires: autoconf >= 2.60
BuildRequires: automake
BuildRequires: bzip2-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:2
BuildRequires: readline-devel
BuildRequires: rpm-build >= 4.6
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
PCRE stands for the Perl Compatible Regular Expression library. PCRE2
is a re-working of the original PCRE library to provide an entirely
new API.
%description -l pl.UTF-8
PCRE (Perl-Compatible Regular Expression) oznacza bibliotekę wyrażeń
regularnych kompatybilnych z perlowymi. PCRE2 to przetworzenie
oryginalnej biblioteki PCRE w celu udostępnienia zupełnie nowego API.
%package common-devel
Summary: Header files for PCRE2 libraries
Summary(pl.UTF-8): Pliki nagłówkowe bibliotek PCRE2
Group: Development/Libraries
%description common-devel
Header files for PCRE2 libraries.
%description common-devel -l pl.UTF-8
Pliki nagłówkowe bibliotek PCRE2.
%package 8
Summary: PCRE2 library with 8-bit character support
Summary(pl.UTF-8): Biblioteka PCRE2 z obsługą znaków 8-bitowych
Group: Libraries
%description 8
PCRE2 (Perl compatible regular expressions) C library with 8-bit
character support.
%description 8 -l pl.UTF-8
Biblioteka C PCRE2 (perlowych wyrażeń regularnych) z obsługą znaków
8-bitowych.
%package 8-devel
Summary: Development files for PCRE2 library with 8-bit character support
Summary(pl.UTF-8): Pliki programistyczne biblioteki PCRE2 z obsługą znaków 8-bitowych
Group: Development/Libraries
Requires: %{name}-8 = %{version}-%{release}
Requires: %{name}-common-devel = %{version}-%{release}
%description 8-devel
Development files for PCRE2 library with 8-bit character support.
%description 8-devel -l pl.UTF-8
Pliki programistyczne biblioteki PCRE2 z obsługą znaków 8-bitowych.
%package 8-static
Summary: Static PCRE2 library with 8-bit character support
Summary(pl.UTF-8): Biblioteka statyczna PCRE2 z obsługą znaków 8-bitowych
Group: Development/Libraries
Requires: %{name}-8-devel = %{version}-%{release}
%description 8-static
Static PCRE2 library with 8-bit character support.
%description 8-static -l pl.UTF-8
Biblioteka statyczna PCRE2 z obsługą znaków 8-bitowych.
%package posix
Summary: POSIX compatible inferface to PCRE2 library with 8-bit character support
Summary(pl.UTF-8): Zgodny z POSIX interfejs do biblioteki PCRE2 z obsługą znaków 8-bitowych
Group: Libraries
Requires: %{name}-8 = %{version}-%{release}
%description posix
POSIX compatible inferface to PCRE2 library with 8-bit character
support.
%description posix -l pl.UTF-8
Zgodny z POSIX interfejs do biblioteki PCRE2 z obsługą znaków
8-bitowych.
%package posix-devel
Summary: Development files for PCRE2 POSIX library
Summary(pl.UTF-8): Pliki programistyczne biblioteki PCRE2 POSIX
Group: Development/Libraries
Requires: %{name}-8-devel = %{version}-%{release}
Requires: %{name}-posix = %{version}-%{release}
%description posix-devel
Development files for PCRE2 POSIX.
%description posix-devel -l pl.UTF-8
Pliki programistyczne biblioteki PCRE2 POSIX.
%package posix-static
Summary: Static PCRE2 POSIX library
Summary(pl.UTF-8): Biblioteka statyczna PCRE2 POSIX
Group: Development/Libraries
Requires: %{name}-posix-devel = %{version}-%{release}
%description posix-static
Static PCRE2 POSIX library.
%description posix-static -l pl.UTF-8
Biblioteka statyczna PCRE2 POSIX.
%package 16
Summary: PCRE2 library with 16-bit character support
Summary(pl.UTF-8): Biblioteka PCRE2 z obsługą znaków 16-bitowych
Group: Libraries
%description 16
PCRE2 (Perl compatible regular expressions) C library with 16-bit
character support.
%description 16 -l pl.UTF-8
Biblioteka C PCRE2 (perlowych wyrażeń regularnych) z obsługą znaków
16-bitowych.
%package 16-devel
Summary: Development files for PCRE2 library with 16-bit character support
Summary(pl.UTF-8): Pliki programistyczne biblioteki PCRE2 z obsługą znaków 16-bitowych
Group: Development/Libraries
Requires: %{name}-16 = %{version}-%{release}
Requires: %{name}-common-devel = %{version}-%{release}
%description 16-devel
Development files for PCRE2 library with 16-bit character support.
%description 16-devel -l pl.UTF-8
Pliki programistyczne biblioteki PCRE2 z obsługą znaków 16-bitowych.
%package 16-static
Summary: Static PCRE2 library with 16-bit character support
Summary(pl.UTF-8): Biblioteka statyczna PCRE2 z obsługą znaków 16-bitowych
Group: Development/Libraries
Requires: %{name}-16-devel = %{version}-%{release}
%description 16-static
Static PCRE2 library with 16-bit character support.
%description 16-static -l pl.UTF-8
Biblioteka statyczna PCRE2 z obsługą znaków 16-bitowych.
%package 32
Summary: PCRE2 library with 32-bit character support
Summary(pl.UTF-8): Biblioteka PCRE2 z obsługą znaków 32-bitowych
Group: Libraries
%description 32
PCRE2 (Perl compatible regular expressions) C library with 32-bit
character support.
%description 32 -l pl.UTF-8
Biblioteka C PCRE2 (perlowych wyrażeń regularnych) z obsługą znaków
32-bitowych.
%package 32-devel
Summary: Development files for PCRE2 library with 32-bit character support
Summary(pl.UTF-8): Pliki programistyczne biblioteki PCRE2 z obsługą znaków 32-bitowych
Group: Development/Libraries
Requires: %{name}-32 = %{version}-%{release}
Requires: %{name}-common-devel = %{version}-%{release}
%description 32-devel
Development files for PCRE2 library with 32-bit character support.
%description 32-devel -l pl.UTF-8
Pliki programistyczne biblioteki PCRE2 z obsługą znaków 32-bitowych.
%package 32-static
Summary: Static PCRE2 library with 32-bit character support
Summary(pl.UTF-8): Biblioteka statyczna PCRE2 z obsługą znaków 32-bitowych
Group: Development/Libraries
Requires: %{name}-32-devel = %{version}-%{release}
%description 32-static
Static PCRE2 library with 32-bit character support.
%description 32-static -l pl.UTF-8
Biblioteka statyczna PCRE2 z obsługą znaków 32-bitowych.
%package grep
Summary: Grep using Perl Compatible Regular Expressions
Summary(pl.UTF-8): Grep używający perlowych wyrażeń regularnych
Group: Applications/Text
Requires: %{name}-8 = %{version}-%{release}
%description grep
pgrep is a grep workalike which uses perl-style regular expressions
instead of POSIX regular expressions.
%description grep -l pl.UTF-8
pgrep jest programem działającym podobnie do grepa, ale używających
perlowych wyrażeń regularnych, a nie posiksowych.
%package test
Summary: A program for testing Perl-compatible regular expressions
Summary(pl.UTF-8): Program do testowania kompatybilnych z perlem wyrażeń regularnych
Group: Applications/Text
%{?with_pcre8:Requires: %{name}-8 = %{version}-%{release}}
%{?with_pcre16:Requires: %{name}-16 = %{version}-%{release}}
%{?with_pcre32:Requires: %{name}-32 = %{version}-%{release}}
%description test
pcretest is a program which you can use to test regular expression.
%description test -l pl.UTF-8
pcretest jest programem, za pomocą którego można sprawdzić poprawność
wyrażenia regularnego.
%package doc-html
Summary: Documentation for PCRE2 in HTML format
Summary(pl.UTF-8): Dokumentacja dla PCRE2 w formacie HTML
Group: Applications/Text
BuildArch: noarch
%description doc-html
Documentation for PCRE2 in HTML format.
%description doc-html -l pl.UTF-8
Dokumentacja dla PCRE2 w formacie HTML.
%prep
%setup -q
%build
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
--disable-silent-rules \
%{!?with_static_libs:--disable-static} \
%ifnarch x32
--enable-jit \
%endif
%{?with_pcre8:--enable-pcre2-8} \
%{?with_pcre16:--enable-pcre2-16} \
%{?with_pcre32:--enable-pcre2-32} \
--enable-pcre2grep-libbz2 \
--enable-pcre2grep-libz \
--enable-pcre2test-libreadline
%{__make}
%if %{with tests}
# tests need big stack
#ulimit -s 32768
%{__make} -j1 check
%endif
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libpcre2*.la
# packaged as %doc
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/pcre2
%clean
rm -rf $RPM_BUILD_ROOT
%post 8 -p /sbin/ldconfig
%postun 8 -p /sbin/ldconfig
%post posix -p /sbin/ldconfig
%postun posix -p /sbin/ldconfig
%post 16 -p /sbin/ldconfig
%postun 16 -p /sbin/ldconfig
%post 32 -p /sbin/ldconfig
%postun 32 -p /sbin/ldconfig
%files common-devel
%defattr(644,root,root,755)
%doc AUTHORS.md ChangeLog HACKING LICENCE.md NEWS README
%attr(755,root,root) %{_bindir}/pcre2-config
%{_includedir}/pcre2.h
%{_mandir}/man1/pcre2-config.1*
%{_mandir}/man3/pcre2.3*
%{_mandir}/man3/pcre2_*.3*
%{_mandir}/man3/pcre2api.3*
%{_mandir}/man3/pcre2build.3*
%{_mandir}/man3/pcre2callout.3*
%{_mandir}/man3/pcre2compat.3*
%{_mandir}/man3/pcre2convert.3*
%{_mandir}/man3/pcre2demo.3*
%{_mandir}/man3/pcre2jit.3*
%{_mandir}/man3/pcre2limits.3*
%{_mandir}/man3/pcre2matching.3*
%{_mandir}/man3/pcre2partial.3*
%{_mandir}/man3/pcre2pattern.3*
%{_mandir}/man3/pcre2perform.3*
%{_mandir}/man3/pcre2posix.3*
%{_mandir}/man3/pcre2sample.3*
%{_mandir}/man3/pcre2serialize.3*
%{_mandir}/man3/pcre2syntax.3*
%{_mandir}/man3/pcre2unicode.3*
%if %{with pcre8}
%files 8
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpcre2-8.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libpcre2-8.so.0
%files 8-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpcre2-8.so
%{_pkgconfigdir}/libpcre2-8.pc
%if %{with static_libs}
%files 8-static
%defattr(644,root,root,755)
%{_libdir}/libpcre2-8.a
%endif
%files posix
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpcre2-posix.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libpcre2-posix.so.3
%files posix-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpcre2-posix.so
%{_includedir}/pcre2posix.h
%{_pkgconfigdir}/libpcre2-posix.pc
%if %{with static_libs}
%files posix-static
%defattr(644,root,root,755)
%{_libdir}/libpcre2-posix.a
%endif
%endif
%if %{with pcre16}
%files 16
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpcre2-16.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libpcre2-16.so.0
%files 16-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpcre2-16.so
%{_pkgconfigdir}/libpcre2-16.pc
%if %{with static_libs}
%files 16-static
%defattr(644,root,root,755)
%{_libdir}/libpcre2-16.a
%endif
%endif
%if %{with pcre32}
%files 32
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpcre2-32.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libpcre2-32.so.0
%files 32-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpcre2-32.so
%{_pkgconfigdir}/libpcre2-32.pc
%if %{with static_libs}
%files 32-static
%defattr(644,root,root,755)
%{_libdir}/libpcre2-32.a
%endif
%endif
%if %{with pcre8}
%files grep
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/pcre2grep
%{_mandir}/man1/pcre2grep.1*
%endif
%files test
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/pcre2test
%{_mandir}/man1/pcre2test.1*
%files doc-html
%defattr(644,root,root,755)
%doc doc/html/*