1 |
%define pcre_major 1 |
%define pcre_major 1 |
2 |
%define pcrecpp_major 0 |
%define pcrecpp_major 0 |
3 |
%define pcreposix_major 1 |
%define pcreposix_major 1 |
4 |
|
%define pcreposix_compat_major 0 |
5 |
%define libname_orig lib%{name} |
%define libname_orig lib%{name} |
6 |
%define libname %mklibname pcre %{pcre_major} |
%define libname %mklibname pcre %{pcre_major} |
7 |
|
%define libnamecpp %mklibname pcrecpp %{pcrecpp_major} |
8 |
|
%define libnameposix %mklibname pcreposix %{pcreposix_major} |
9 |
|
%define libnameposix_compat %mklibname pcreposix %{pcreposix_compat_major} |
10 |
%define develname %mklibname -d pcre |
%define develname %mklibname -d pcre |
11 |
|
|
12 |
%define build_pcreposix_compat 1 |
%define build_pcreposix_compat 1 |
41 |
Provides: %{libname_orig} = %{version}-%{release} |
Provides: %{libname_orig} = %{version}-%{release} |
42 |
|
|
43 |
%description -n %{libname} |
%description -n %{libname} |
44 |
PCRE has its own native API, but a set of "wrapper" functions that are based on |
This package contains the shared library libpcre. |
45 |
the POSIX API are also supplied in the library libpcreposix. Note that this |
|
46 |
just provides a POSIX calling interface to PCRE: the regular expressions |
|
47 |
themselves still follow Perl syntax and semantics. The header file |
%package -n %{libnamecpp} |
48 |
for the POSIX-style functions is called pcreposix.h. The official POSIX name is |
Group: System/Libraries |
49 |
regex.h, but I didn't want to risk possible problems with existing files of |
Summary: Perl-compatible regular expression library |
50 |
that name by distributing it that way. To use it with an existing program that |
Conflicts: %{_lib}pcre0 < 8.21-3 |
51 |
uses the POSIX API, it will have to be renamed or pointed at by a link. |
|
52 |
|
%description -n %{libnamecpp} |
53 |
|
This package contains the shared library libpcrecpp. |
54 |
|
|
55 |
|
|
56 |
|
%package -n %{libnameposix} |
57 |
|
Group: System/Libraries |
58 |
|
Summary: Perl-compatible regular expression library |
59 |
|
Conflicts: %{_lib}pcre0 < 8.21-3 |
60 |
|
|
61 |
|
%description -n %{libnameposix} |
62 |
|
This package contains the shared library libpcreposix. |
63 |
|
|
64 |
|
|
65 |
|
%package -n %{libnameposix_compat} |
66 |
|
Group: System/Libraries |
67 |
|
Summary: Perl-compatible regular expression library |
68 |
|
Conflicts: %{_lib}pcre0 < 8.21-3 |
69 |
|
|
70 |
|
%description -n %{libnameposix_compat} |
71 |
|
This package contains the shared library libpcreposix compat. |
72 |
|
|
73 |
|
|
74 |
%package -n %{develname} |
%package -n %{develname} |
75 |
Group: Development/C |
Group: Development/C |
76 |
Summary: Headers and static lib for pcre development |
Summary: Headers and static lib for pcre development |
77 |
Requires: %{libname} = %{version}-%{release} |
Requires: %{libname} = %{version}-%{release} |
78 |
|
Requires: %{libnamecpp} = %{version}-%{release} |
79 |
|
Requires: %{libnameposix} = %{version}-%{release} |
80 |
|
Requires: %{libnameposix_compat} = %{version}-%{release} |
81 |
Provides: %{libname_orig}-devel = %{version}-%{release} |
Provides: %{libname_orig}-devel = %{version}-%{release} |
82 |
Provides: %{name}-devel = %{version}-%{release} |
Provides: %{name}-devel = %{version}-%{release} |
83 |
Obsoletes: %mklibname pcre 0 -d |
Obsoletes: %mklibname pcre 0 -d |
86 |
Install this package if you want do compile applications using the pcre |
Install this package if you want do compile applications using the pcre |
87 |
library. |
library. |
88 |
|
|
89 |
%prep |
The header file for the POSIX-style functions is called pcreposix.h. The |
90 |
|
official POSIX name is regex.h, but I didn't want to risk possible problems |
91 |
|
with existing files of that name by distributing it that way. To use it with an |
92 |
|
existing program that uses the POSIX API, it will have to be renamed or pointed |
93 |
|
at by a link. |
94 |
|
|
95 |
|
%prep |
96 |
%setup -q |
%setup -q |
97 |
%patch1 -p1 -b .detect_into_kdelibs |
%patch1 -p1 -b .detect_into_kdelibs |
98 |
%patch2 -p0 |
%patch2 -p0 |
114 |
cd $i |
cd $i |
115 |
mkdir -p m4 |
mkdir -p m4 |
116 |
autoreconf -fi |
autoreconf -fi |
117 |
%configure2_5x --enable-utf8 --enable-unicode-properties |
%configure2_5x \ |
118 |
|
--disable-static \ |
119 |
|
--enable-utf8 \ |
120 |
|
--enable-unicode-properties \ |
121 |
|
--enable-jit |
122 |
%make |
%make |
123 |
cd - |
cd - |
124 |
done |
done |
141 |
%multiarch_binaries %{buildroot}%{_bindir}/pcre-config |
%multiarch_binaries %{buildroot}%{_bindir}/pcre-config |
142 |
|
|
143 |
# Remove unwanted files |
# Remove unwanted files |
144 |
rm -f %{buildroot}/%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS} |
rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS} |
145 |
rm -f %{buildroot}/%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt} |
rm -f %{buildroot}%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt} |
146 |
rm -f %{buildroot}/%{_docdir}/pcre/{pcretest.txt,README} |
rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README} |
147 |
rm -rf %{buildroot}/%{_docdir}/pcre/html |
rm -rf %{buildroot}%{_docdir}/pcre/html |
148 |
rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/*.a |
rm -f %{buildroot}%{_libdir}/*.la |
149 |
|
|
150 |
%files |
%files |
151 |
|
%doc AUTHORS COPYING LICENCE NEWS README |
152 |
%{_mandir}/man1/pcregrep.1* |
%{_mandir}/man1/pcregrep.1* |
153 |
%{_mandir}/man1/pcretest.1* |
%{_mandir}/man1/pcretest.1* |
154 |
%{_bindir}/pcregrep |
%{_bindir}/pcregrep |
155 |
%{_bindir}/pcretest |
%{_bindir}/pcretest |
156 |
|
|
157 |
%files -n %{libname} |
%files -n %{libname} |
|
%doc AUTHORS COPYING LICENCE NEWS README |
|
158 |
%{_libdir}/libpcre.so.%{pcre_major}* |
%{_libdir}/libpcre.so.%{pcre_major}* |
159 |
|
|
160 |
|
%files -n %{libnamecpp} |
161 |
%{_libdir}/libpcrecpp.so.%{pcrecpp_major}* |
%{_libdir}/libpcrecpp.so.%{pcrecpp_major}* |
162 |
|
|
163 |
%if %{build_pcreposix_compat} |
%if %{build_pcreposix_compat} |
164 |
%{_libdir}/libpcreposix.so.0* |
%files -n %{libnameposix_compat} |
165 |
|
%{_libdir}/libpcreposix.so.%{pcreposix_compat_major}* |
166 |
%endif |
%endif |
167 |
|
|
168 |
|
%files -n %{libnameposix} |
169 |
%{_libdir}/libpcreposix.so.%{pcreposix_major}* |
%{_libdir}/libpcreposix.so.%{pcreposix_major}* |
170 |
|
|
171 |
%files -n %{develname} |
%files -n %{develname} |