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

  ViewVC Help
Powered by ViewVC 1.1.28