/[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 323571 - (show annotations) (download)
Fri Nov 30 22:37:37 2012 UTC (7 years, 1 month ago) by fwang
File size: 5379 byte(s)
new version 8.32
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 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
11
12 %define build_pcreposix_compat 1
13
14 Summary: Perl-compatible regular expression library
15 Name: pcre
16 Version: 8.32
17 Release: %mkrel 1
18 License: BSD-Style
19 Group: File tools
20 URL: http://www.pcre.org/
21 Source0: http://downloads.sourceforge.net/pcre/%{name}-%{version}.tar.bz2
22 Source1: http://downloads.sourceforge.net/pcre/%{name}-%{version}.tar.bz2.sig
23 Requires: %{libname} = %{version}-%{release}
24 BuildRequires: automake
25 Patch1: pcre-0.6.5-fix-detect-into-kdelibs.patch
26 Patch2: pcre-linkage_fix.diff
27 # from debian:
28 Patch4: pcre-pcreposix-glibc-conflict.patch
29
30 %description
31 PCRE has its own native API, but a set of "wrapper" functions that are based on
32 the POSIX API are also supplied in the library libpcreposix. Note that this
33 just provides a POSIX calling interface to PCRE: the regular expressions
34 themselves still follow Perl syntax and semantics.
35 This package contains a grep variant based on the PCRE library.
36
37 %package -n %{libname}
38 Group: System/Libraries
39 Summary: Perl-compatible regular expression library
40 Requires(pre): filesystem >= 2.1.9-18
41 Provides: %{libname_orig} = %{version}-%{release}
42
43 %description -n %{libname}
44 This package contains the shared library libpcre.
45
46
47 %package -n %{libnamecpp}
48 Group: System/Libraries
49 Summary: Perl-compatible regular expression library
50 Conflicts: %{_lib}pcre0 < 8.21-3
51
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}
75 Group: Development/C
76 Summary: Headers and static lib for pcre development
77 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}
82 Provides: %{name}-devel = %{version}-%{release}
83 Obsoletes: %mklibname pcre 0 -d
84
85 %description -n %{develname}
86 Install this package if you want do compile applications using the pcre
87 library.
88
89 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
97 %patch1 -p1 -b .detect_into_kdelibs
98 %patch2 -p0
99
100 %if %{build_pcreposix_compat}
101 # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
102 # create a libpcreposix.so.0 without the patch
103 cp -a . ../pcre-with-pcreposix_compat && mv ../pcre-with-pcreposix_compat .
104 %endif
105 %patch4 -p1 -b .symbol-conflict
106
107 %build
108 %if %{build_pcreposix_compat}
109 dirs="pcre-with-pcreposix_compat ."
110 %else
111 dirs="."
112 %endif
113 for i in $dirs; do
114 cd $i
115 mkdir -p m4
116 autoreconf -fi
117 %configure2_5x \
118 --disable-static \
119 --enable-utf8 \
120 --enable-unicode-properties \
121 --enable-jit
122 %make
123 cd -
124 done
125
126 %check
127 export LC_ALL=C
128 # Tests, patch out actual pcre_study_size in expected results
129 #echo 'int main() { printf("%d", sizeof(pcre_study_data)); return 0; }' | \
130 #%{__cc} -xc - -include "pcre_internal.h" -I. -o study_size
131 #STUDY_SIZE=`./study_size`
132 #perl -pi -e "s,(Study size\s+=\s+)\d+,\${1}$STUDY_SIZE," testdata/testoutput*
133 make check
134
135 %install
136 %if %{build_pcreposix_compat}
137 %makeinstall_std -C pcre-with-pcreposix_compat
138 %endif
139 %makeinstall_std
140
141 %multiarch_binaries %{buildroot}%{_bindir}/pcre-config
142
143 # Remove unwanted files
144 rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
145 rm -f %{buildroot}%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt}
146 rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README}
147 rm -rf %{buildroot}%{_docdir}/pcre/html
148 rm -f %{buildroot}%{_libdir}/*.la
149
150 %files
151 %doc AUTHORS COPYING LICENCE NEWS README
152 %{_mandir}/man1/pcregrep.1*
153 %{_mandir}/man1/pcretest.1*
154 %{_bindir}/pcregrep
155 %{_bindir}/pcretest
156
157 %files -n %{libname}
158 %{_libdir}/libpcre.so.%{pcre_major}*
159
160 %files -n %{libnamecpp}
161 %{_libdir}/libpcrecpp.so.%{pcrecpp_major}*
162
163 %if %{build_pcreposix_compat}
164 %files -n %{libnameposix_compat}
165 %{_libdir}/libpcreposix.so.%{pcreposix_compat_major}*
166 %endif
167
168 %files -n %{libnameposix}
169 %{_libdir}/libpcreposix.so.%{pcreposix_major}*
170
171 %files -n %{develname}
172 %doc doc/html
173 %doc ChangeLog
174 %{_libdir}/lib*.so
175 %{_includedir}/*.h
176 %{_libdir}/pkgconfig/libpcre.pc
177 %{_libdir}/pkgconfig/libpcrecpp.pc
178 %{_libdir}/pkgconfig/libpcreposix.pc
179 %{_bindir}/pcre-config
180 %multiarch %{multiarch_bindir}/pcre-config
181 %{_mandir}/man1/pcre-config.1*
182 %{_mandir}/man3/*.3*

  ViewVC Help
Powered by ViewVC 1.1.26