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

Annotation of /cauldron/pcre/pristine/SPECS/pcre.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30