/[packages]/cauldron/pcre/current/SPECS/pcre.spec
ViewVC logotype

Contents of /cauldron/pcre/current/SPECS/pcre.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1551592 - (show annotations) (download)
Fri Feb 28 12:45:31 2020 UTC (4 months ago) by daviddavid
File size: 7741 byte(s)
- restore and rediff P4 (pcre-pcreposix-glibc-conflict.patch) (SILENT)

1 %define pcre_major 1
2 %define pcrecpp_major 0
3 %define pcreposix_major 1
4 %define pcreposix_compat_major 0
5 %define libname_orig lib%{name}
6 %define libname16_orig lib%{name}16
7 %define libname32_orig lib%{name}32
8 %define libname %mklibname pcre %{pcre_major}
9 %define libname16 %mklibname pcre 16 %{pcrecpp_major}
10 %define libname32 %mklibname pcre 32 %{pcrecpp_major}
11 %define libnamecpp %mklibname pcrecpp %{pcrecpp_major}
12 %define libnameposix %mklibname pcreposix %{pcreposix_major}
13 %define libnameposix_compat %mklibname pcreposix %{pcreposix_compat_major}
14 %define develname %mklibname -d pcre
15 %define staticname %mklibname -s -d pcre
16 %define develcpp %mklibname -d pcrecpp
17 %define develposix %mklibname -d pcreposix
18 %define olddevelname %mklibname %{name} 0 -d
19
20 %define build_pcreposix_compat 1
21
22 Summary: Perl-compatible regular expression library
23 Name: pcre
24 Version: 8.44
25 Release: %mkrel 1
26 License: BSD-Style
27 Group: File tools
28 URL: http://www.pcre.org/
29 Source0: ftp://ftp.pcre.org/pub/pcre/%{name}-%{version}.tar.bz2
30 Source1: ftp://ftp.pcre.org/pub/pcre/%{name}-%{version}.tar.bz2.sig
31 Patch0: pcre-0.6.5-fix-detect-into-kdelibs.patch
32 Patch1: pcre-8.33-linkage-fix.patch
33 # from debian
34 Patch4: pcre-pcreposix-glibc-conflict.patch
35 Patch5: bug2173.patch
36 BuildRequires: automake
37 Requires: %{libname} = %{version}-%{release}
38
39 %description
40 PCRE has its own native API, but a set of "wrapper" functions that are based on
41 the POSIX API are also supplied in the library libpcreposix. Note that this
42 just provides a POSIX calling interface to PCRE: the regular expressions
43 themselves still follow Perl syntax and semantics.
44 This package contains a grep variant based on the PCRE library.
45
46 %package -n %{libname}
47 Group: System/Libraries
48 Summary: Perl-compatible regular expression library
49 Requires(pre): filesystem >= 2.1.9-18
50 Provides: %{libname_orig} = %{version}-%{release}
51
52 %description -n %{libname}
53 This package contains the shared library libpcre.
54
55 %package -n %{libname16}
56 Group: System/Libraries
57 Summary: Perl-compatible regular expression library
58 Requires(pre): filesystem >= 2.1.9-18
59 Provides: %{libname16_orig} = %{version}-%{release}
60 Obsoletes: %{_lib}pcre16_1 < %{version}-%{release}
61
62 %description -n %{libname16}
63 This package contains the shared library libpcre.
64
65 %package -n %{libname32}
66 Group: System/Libraries
67 Summary: Perl-compatible regular expression library
68 Requires(pre): filesystem >= 2.1.9-18
69 Provides: %{libname32_orig} = %{version}-%{release}
70 Obsoletes: %{_lib}pcre32_1 < %{version}-%{release}
71
72 %description -n %{libname32}
73 This package contains the shared library libpcre.
74
75 %package -n %{libnamecpp}
76 Group: System/Libraries
77 Summary: Perl-compatible regular expression library
78 Conflicts: %{_lib}pcre0 < 8.21-3
79
80 %description -n %{libnamecpp}
81 This package contains the shared library libpcrecpp.
82
83
84 %package -n %{libnameposix}
85 Group: System/Libraries
86 Summary: Perl-compatible regular expression library
87 Conflicts: %{_lib}pcre0 < 8.21-3
88
89 %description -n %{libnameposix}
90 This package contains the shared library libpcreposix.
91
92
93 %package -n %{libnameposix_compat}
94 Group: System/Libraries
95 Summary: Perl-compatible regular expression library
96 Conflicts: %{_lib}pcre0 < 8.21-3
97
98 %description -n %{libnameposix_compat}
99 This package contains the shared library libpcreposix compat.
100
101
102 %package -n %{develname}
103 Group: Development/C
104 Summary: Headers for pcre development
105 Requires: %{libname} = %{version}-%{release}
106 Requires: %{libname16} = %{version}-%{release}
107 Requires: %{libname32} = %{version}-%{release}
108 Provides: %{libname_orig}-devel = %{version}-%{release}
109 Provides: %{name}-devel = %{version}-%{release}
110 Obsoletes: %{olddevelname} < 8.21-3
111
112 %description -n %{develname}
113 Install this package if you want do compile applications using the pcre
114 library.
115
116 %package -n %{develcpp}
117 Group: Development/C++
118 Summary: Headers for pcrecpp development
119 Provides: pcrecpp-devel = %{version}-%{release}
120 Requires: %{libnamecpp} = %{version}-%{release}
121 Requires: %{develname} = %{version}-%{release}
122 Conflicts: pcre-devel < 8.32-4
123
124 %description -n %{develcpp}
125 Install this package if you want do compile applications using the pcrecpp
126 library.
127
128 %package -n %{develposix}
129 Group: Development/C
130 Summary: Headers for pcreposix development
131 Provides: pcreposix-devel = %{version}-%{release}
132 Requires: %{libnameposix} = %{version}-%{release}
133 Requires: %{develname} = %{version}-%{release}
134 Conflicts: pcre-devel < 8.32-4
135
136 %description -n %{develposix}
137 Install this package if you want do compile applications using the pcre
138 library.
139
140 The header file for the POSIX-style functions is called pcreposix.h. The
141 official POSIX name is regex.h, but I didn't want to risk possible problems
142 with existing files of that name by distributing it that way. To use it with an
143 existing program that uses the POSIX API, it will have to be renamed or pointed
144 at by a link.
145
146 %package -n %{staticname}
147 Group: Development/C
148 Summary: Library file for linking statically to PCRE
149 Provides: pcre-static-devel = %{version}-%{release}
150 Requires: %{develname} = %{version}-%{release}
151
152 %description -n %{staticname}
153 Library file for linking statically against PCRE.
154
155 %prep
156 %setup -q
157 %patch0 -p1 -b .detect-into-kdelibs
158 %patch1 -p1 -b .linkage-fix
159
160 %if %{build_pcreposix_compat}
161 # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
162 # create a libpcreposix.so.0 without the patch
163 cp -a . ../pcre-with-pcreposix_compat && mv ../pcre-with-pcreposix_compat .
164 %endif
165 %patch4 -p1 -b .symbol-conflict
166 %patch5 -p1
167
168 %build
169 %if %{build_pcreposix_compat}
170 dirs="pcre-with-pcreposix_compat ."
171 %else
172 dirs="."
173 %endif
174 for i in $dirs; do
175 cd $i
176 mkdir -p m4
177 autoreconf -fi
178 %configure \
179 --enable-static \
180 --enable-utf \
181 --enable-unicode-properties \
182 --enable-pcre8 \
183 --enable-pcre16 \
184 --enable-pcre32 \
185 --enable-jit
186 %make_build
187 cd -
188 done
189
190 %check
191 export LC_ALL=C
192 %__make check
193
194 %install
195 %if %{build_pcreposix_compat}
196 %make_install -C pcre-with-pcreposix_compat
197 %endif
198 %make_install
199
200 %multiarch_binaries %{buildroot}%{_bindir}/pcre-config
201
202 # Remove unwanted files
203 rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
204 rm -f %{buildroot}%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt}
205 rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README}
206 rm -rf %{buildroot}%{_docdir}/pcre/html
207 rm -f %{buildroot}%{_libdir}/*.la
208
209 %files
210 %doc AUTHORS COPYING LICENCE NEWS README
211 %{_mandir}/man1/pcregrep.1*
212 %{_mandir}/man1/pcretest.1*
213 %{_bindir}/pcregrep
214 %{_bindir}/pcretest
215
216 %files -n %{libname}
217 %{_libdir}/libpcre.so.%{pcre_major}{,.*}
218
219 %files -n %{libname16}
220 %{_libdir}/libpcre16.so.%{pcrecpp_major}{,.*}
221
222 %files -n %{libname32}
223 %{_libdir}/libpcre32.so.%{pcrecpp_major}{,.*}
224
225 %files -n %{libnamecpp}
226 %{_libdir}/libpcrecpp.so.%{pcrecpp_major}{,.*}
227
228 %if %{build_pcreposix_compat}
229 %files -n %{libnameposix_compat}
230 %{_libdir}/libpcreposix.so.%{pcreposix_compat_major}{,.*}
231 %endif
232
233 %files -n %{libnameposix}
234 %{_libdir}/libpcreposix.so.%{pcreposix_major}{,.*}
235
236 %files -n %{develname}
237 %doc doc/html
238 %doc ChangeLog
239 %{_libdir}/libpcre.so
240 %{_libdir}/libpcre16.so
241 %{_libdir}/libpcre32.so
242 %{_includedir}/pcre.h
243 %{_includedir}/pcre_*.h
244 %{_libdir}/pkgconfig/libpcre.pc
245 %{_libdir}/pkgconfig/libpcre16.pc
246 %{_libdir}/pkgconfig/libpcre32.pc
247 %{_bindir}/pcre-config
248 %multiarch %{multiarch_bindir}/pcre-config
249 %{_mandir}/man1/pcre-config.1*
250 %{_mandir}/man3/*.3*
251 %exclude %{_libdir}/libpcreposix.so
252 %exclude %{_mandir}/man3/pcreposix.3*
253
254 %files -n %{develcpp}
255 %{_includedir}/pcrecpp*.h
256 %{_libdir}/libpcrecpp.so
257 %{_libdir}/pkgconfig/libpcrecpp.pc
258 %{_mandir}/man3/pcrecpp.3*
259
260 %files -n %{develposix}
261 %{_includedir}/pcreposix.h
262 %{_libdir}/libpcreposix.so
263 %{_libdir}/pkgconfig/libpcreposix.pc
264 %{_mandir}/man3/pcreposix.3*
265
266 %files -n %{staticname}
267 %{_libdir}/*.a

  ViewVC Help
Powered by ViewVC 1.1.28