1 |
%define major 0 |
%define pcre_major 1 |
2 |
|
%define pcrecpp_major 0 |
3 |
%define pcreposix_major 1 |
%define pcreposix_major 1 |
4 |
%define libname_orig lib%{name} |
%define libname_orig lib%{name} |
5 |
%define libname %mklibname pcre %{major} |
%define libname %mklibname pcre %{pcre_major} |
6 |
%define develname %mklibname -d pcre |
%define develname %mklibname -d pcre |
7 |
|
|
8 |
%define build_pcreposix_compat 1 |
%define build_pcreposix_compat 1 |
9 |
|
|
10 |
Summary: Perl-compatible regular expression library |
Summary: Perl-compatible regular expression library |
11 |
Name: pcre |
Name: pcre |
12 |
Version: 8.21 |
Version: 8.31 |
13 |
Release: %mkrel 2 |
Release: %mkrel 1 |
14 |
License: BSD-Style |
License: BSD-Style |
15 |
Group: File tools |
Group: File tools |
16 |
URL: http://www.pcre.org/ |
URL: http://www.pcre.org/ |
20 |
BuildRequires: automake |
BuildRequires: automake |
21 |
Patch1: pcre-0.6.5-fix-detect-into-kdelibs.patch |
Patch1: pcre-0.6.5-fix-detect-into-kdelibs.patch |
22 |
Patch2: pcre-linkage_fix.diff |
Patch2: pcre-linkage_fix.diff |
|
Patch3: pcre-7.8-format_not_a_string_literal_and_no_format_arguments.diff |
|
23 |
# from debian: |
# from debian: |
24 |
Patch4: pcre-pcreposix-glibc-conflict.patch |
Patch4: pcre-pcreposix-glibc-conflict.patch |
25 |
|
|
35 |
Summary: Perl-compatible regular expression library |
Summary: Perl-compatible regular expression library |
36 |
Requires(pre): filesystem >= 2.1.9-18 |
Requires(pre): filesystem >= 2.1.9-18 |
37 |
Provides: %{libname_orig} = %{version}-%{release} |
Provides: %{libname_orig} = %{version}-%{release} |
|
Conflicts: pcre <= 4.0 |
|
38 |
|
|
39 |
%description -n %{libname} |
%description -n %{libname} |
40 |
PCRE has its own native API, but a set of "wrapper" functions that are based on |
PCRE has its own native API, but a set of "wrapper" functions that are based on |
53 |
Provides: %{libname_orig}-devel = %{version}-%{release} |
Provides: %{libname_orig}-devel = %{version}-%{release} |
54 |
Provides: %{name}-devel = %{version}-%{release} |
Provides: %{name}-devel = %{version}-%{release} |
55 |
Obsoletes: %mklibname pcre 0 -d |
Obsoletes: %mklibname pcre 0 -d |
|
Conflicts: pcre <= 4.0 |
|
56 |
|
|
57 |
%description -n %{develname} |
%description -n %{develname} |
58 |
Install this package if you want do compile applications using the pcre |
Install this package if you want do compile applications using the pcre |
64 |
%patch1 -p1 -b .detect_into_kdelibs |
%patch1 -p1 -b .detect_into_kdelibs |
65 |
%patch2 -p0 |
%patch2 -p0 |
66 |
|
|
|
|
|
67 |
%if %{build_pcreposix_compat} |
%if %{build_pcreposix_compat} |
68 |
# pcre-pcreposix-glibc-conflict patch below breaks compatibility, |
# pcre-pcreposix-glibc-conflict patch below breaks compatibility, |
69 |
# create a libpcreposix.so.0 without the patch |
# create a libpcreposix.so.0 without the patch |
104 |
%multiarch_binaries %{buildroot}%{_bindir}/pcre-config |
%multiarch_binaries %{buildroot}%{_bindir}/pcre-config |
105 |
|
|
106 |
# Remove unwanted files |
# Remove unwanted files |
107 |
rm -f %{buildroot}/%_docdir/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS} |
rm -f %{buildroot}/%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS} |
108 |
rm -f %{buildroot}/%_docdir/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt} |
rm -f %{buildroot}/%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt} |
109 |
rm -f %{buildroot}/%_docdir/pcre/{pcretest.txt,README} |
rm -f %{buildroot}/%{_docdir}/pcre/{pcretest.txt,README} |
110 |
rm -rf %{buildroot}/%_docdir/pcre/html |
rm -rf %{buildroot}/%{_docdir}/pcre/html |
111 |
rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/*.a |
rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/*.a |
112 |
|
|
113 |
%files |
%files |
114 |
%_mandir/man1/pcregrep.1* |
%{_mandir}/man1/pcregrep.1* |
115 |
%_mandir/man1/pcretest.1* |
%{_mandir}/man1/pcretest.1* |
116 |
%_bindir/pcregrep |
%{_bindir}/pcregrep |
117 |
%_bindir/pcretest |
%{_bindir}/pcretest |
118 |
|
|
119 |
%files -n %{libname} |
%files -n %{libname} |
120 |
%doc AUTHORS COPYING LICENCE NEWS README |
%doc AUTHORS COPYING LICENCE NEWS README |
121 |
%_libdir/lib*.so.%{major}* |
%{_libdir}/libpcre.so.%{pcre_major}* |
122 |
%_libdir/libpcreposix.so.%{pcreposix_major}* |
%{_libdir}/libpcrecpp.so.%{pcrecpp_major}* |
123 |
|
%if %{build_pcreposix_compat} |
124 |
|
%{_libdir}/libpcreposix.so.0* |
125 |
|
%endif |
126 |
|
%{_libdir}/libpcreposix.so.%{pcreposix_major}* |
127 |
|
|
128 |
%files -n %{develname} |
%files -n %{develname} |
129 |
%doc doc/html |
%doc doc/html |
130 |
%doc ChangeLog |
%doc ChangeLog |
131 |
%_libdir/lib*.so |
%{_libdir}/lib*.so |
132 |
%_includedir/*.h |
%{_includedir}/*.h |
133 |
%_libdir/pkgconfig/libpcre.pc |
%{_libdir}/pkgconfig/libpcre.pc |
134 |
%_libdir/pkgconfig/libpcrecpp.pc |
%{_libdir}/pkgconfig/libpcrecpp.pc |
135 |
%_libdir/pkgconfig/libpcreposix.pc |
%{_libdir}/pkgconfig/libpcreposix.pc |
136 |
%_bindir/pcre-config |
%{_bindir}/pcre-config |
137 |
%multiarch %{multiarch_bindir}/pcre-config |
%multiarch %{multiarch_bindir}/pcre-config |
138 |
%_mandir/man1/pcre-config.1* |
%{_mandir}/man1/pcre-config.1* |
139 |
%_mandir/man3/*.3* |
%{_mandir}/man3/*.3* |