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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 581 by blino, Sat Jan 8 13:42:40 2011 UTC revision 798078 by luigiwalser, Fri Nov 21 17:42:25 2014 UTC
# Line 1  Line 1 
1  %define major 0  %define pcre_major 1
2    %define pcrecpp_major 0
3  %define pcreposix_major 1  %define pcreposix_major 1
4  %define libname_orig    lib%{name}  %define pcreposix_compat_major 0
5  %define libname %mklibname pcre %{major}  %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  %define develname %mklibname -d pcre
15    %define develcpp %mklibname -d pcrecpp
16    %define develposix %mklibname -d pcreposix
17    %define olddevelname %mklibname %{name} 0 -d
18    
19  %define build_pcreposix_compat 1  %define build_pcreposix_compat 1
20    
21  Summary:        Perl-compatible regular expression library  Summary:        Perl-compatible regular expression library
22  Name:           pcre  Name:           pcre
23  Version:        8.11  Version:        8.36
24  Release:        %mkrel 1  Release:        %mkrel 3
25  License:        BSD-Style  License:        BSD-Style
26  Group:          File tools  Group:          File tools
27  URL:            http://www.pcre.org/  URL:            http://www.pcre.org/
28  Source0:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%name-%version.tar.bz2  Source0:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
29  Source1:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%name-%version.tar.bz2.sig  Source1:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2.sig
30  Requires:       %{libname} = %{version}-%{release}  Requires:       %{libname} = %{version}-%{release}
31  BuildRequires:  automake  BuildRequires:  automake
32  Patch1:         pcre-0.6.5-fix-detect-into-kdelibs.patch  Patch0:         pcre-0.6.5-fix-detect-into-kdelibs.patch
33  Patch2:         pcre-linkage_fix.diff  Patch1:         pcre-8.33-linkage-fix.patch
34  Patch3:         pcre-7.8-format_not_a_string_literal_and_no_format_arguments.diff  Patch2:         pcre-8.36-CVE-2014-8964.patch
35  # from debian:  # from debian:
36  Patch4:         pcre-pcreposix-glibc-conflict.patch  Patch4:         pcre-pcreposix-glibc-conflict.patch
37  BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot  
38    
39  %description  %description
40  PCRE has its own native API, but a set of "wrapper" functions that are based on  PCRE has its own native API, but a set of "wrapper" functions that are based on
# Line 34  This package contains a grep variant bas Line 46  This package contains a grep variant bas
46  %package -n     %{libname}  %package -n     %{libname}
47  Group:          System/Libraries  Group:          System/Libraries
48  Summary:        Perl-compatible regular expression library  Summary:        Perl-compatible regular expression library
49    Requires(pre):  filesystem >= 2.1.9-18
50  Provides:       %{libname_orig} = %{version}-%{release}  Provides:       %{libname_orig} = %{version}-%{release}
 Conflicts:      pcre <= 4.0  
51    
52  %description -n %{libname}  %description -n %{libname}
53  PCRE has its own native API, but a set of "wrapper" functions that are based on  This package contains the shared library libpcre.
54  the POSIX API are also supplied in the library libpcreposix. Note that this  
55  just provides a POSIX calling interface to PCRE: the regular expressions  %package -n     %{libname16}
56  themselves still follow Perl syntax and semantics. The header file  Group:          System/Libraries
57  for the POSIX-style functions is called pcreposix.h. The official POSIX name is  Summary:        Perl-compatible regular expression library
58  regex.h, but I didn't want to risk possible problems with existing files of  Requires(pre):  filesystem >= 2.1.9-18
59  that name by distributing it that way. To use it with an existing program that  Provides:       %{libname16_orig} = %{version}-%{release}
60  uses the POSIX API, it will have to be renamed or pointed at by a link.  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}  %package -n     %{develname}
103  Group:          Development/C  Group:          Development/C
104  Summary:        Headers and static lib for pcre development  Summary:        Headers and static lib for pcre development
105  Requires:       %{libname} = %{version}-%{release}  Requires:       %{libname} = %{version}-%{release}
106    Requires:       %{libname16} = %{version}-%{release}
107    Requires:       %{libname32} = %{version}-%{release}
108  Provides:       %{libname_orig}-devel = %{version}-%{release}  Provides:       %{libname_orig}-devel = %{version}-%{release}
109  Provides:       %{name}-devel = %{version}-%{release}  Provides:       %{name}-devel = %{version}-%{release}
110  Obsoletes:      %mklibname pcre 0 -d  Obsoletes:      %{olddevelname} < 8.21-3
 Conflicts:      pcre <= 4.0  
111    
112  %description -n %{develname}  %description -n %{develname}
113  Install this package if you want do compile applications using the pcre  Install this package if you want do compile applications using the pcre
114  library.  library.
115    
116  %prep  %package -n     %{develcpp}
117    Group:          Development/C++
118    Summary:        Headers and static lib 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  %setup -q  %description -n %{develcpp}
125  %patch1 -p1 -b .detect_into_kdelibs  Install this package if you want do compile applications using the pcrecpp
126  %patch2 -p0  library.
127  #%patch3 -p0 -b .format_not_a_string_literal_and_no_format_arguments  
128    %package -n     %{develposix}
129    Group:          Development/C
130    Summary:        Headers and static lib 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    %prep
147    %setup -q
148    %patch0 -p1 -b .detect-into-kdelibs
149    %patch1 -p1 -b .linkage-fix
150    %patch2 -p1 -b .CVE-2014-8964
151    
152  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
153    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
# Line 84  dirs="." Line 165  dirs="."
165  for i in $dirs; do  for i in $dirs; do
166    cd $i    cd $i
167    mkdir -p m4    mkdir -p m4
168    autoreconf -fis    autoreconf -fi
169    %configure2_5x --enable-utf8 --enable-unicode-properties    %configure2_5x \
170            --disable-static \
171            --enable-utf \
172            --enable-unicode-properties \
173            --enable-pcre8 \
174            --enable-pcre16 \
175            --enable-pcre32 \
176            --enable-jit
177    %make    %make
178    cd -    cd -
179  done  done
180    
181  %check  %check
182  export LC_ALL=C  export LC_ALL=C
 # Tests, patch out actual pcre_study_size in expected results  
 #echo 'int main() { printf("%d", sizeof(pcre_study_data)); return 0; }' | \  
 #%{__cc} -xc - -include "pcre_internal.h" -I. -o study_size  
 #STUDY_SIZE=`./study_size`  
 #perl -pi -e "s,(Study size\s+=\s+)\d+,\${1}$STUDY_SIZE," testdata/testoutput*  
183  make check  make check
184    
185  %install  %install
 rm -rf $RPM_BUILD_ROOT  
186  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
187  %makeinstall_std -C pcre-with-pcreposix_compat  %makeinstall_std -C pcre-with-pcreposix_compat
188  %endif  %endif
189  %makeinstall_std  %makeinstall_std
190    
191  %multiarch_binaries $RPM_BUILD_ROOT%{_bindir}/pcre-config  %multiarch_binaries %{buildroot}%{_bindir}/pcre-config
   
 mkdir -p $RPM_BUILD_ROOT/%_lib  
 mv $RPM_BUILD_ROOT/%_libdir/lib%{name}.so.%{major}.* $RPM_BUILD_ROOT/%_lib  
 cd $RPM_BUILD_ROOT/%_libdir  
 ln -s ../../%_lib/lib%{name}.so.%{major}.* .  
192    
193  # Remove unwanted files  # Remove unwanted files
194  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}  rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
195  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt}  rm -f %{buildroot}%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt}
196  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{pcretest.txt,README}  rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README}
197  rm -rf $RPM_BUILD_ROOT/%_docdir/pcre/html  rm -rf %{buildroot}%{_docdir}/pcre/html
198    rm -f %{buildroot}%{_libdir}/*.la
 %clean  
 rm -rf $RPM_BUILD_ROOT  
199    
 %if %mdkversion < 200900  
 %post -n %{libname} -p /sbin/ldconfig  
 %endif  
 %if %mdkversion < 200900  
 %postun -n %{libname} -p /sbin/ldconfig  
 %endif  
   
200  %files  %files
201  %defattr(-,root,root)  %doc AUTHORS COPYING LICENCE NEWS README
202    %{_mandir}/man1/pcregrep.1*
203    %{_mandir}/man1/pcretest.1*
204    %{_bindir}/pcregrep  
205    %{_bindir}/pcretest
206    
207  %_mandir/man1/pcregrep.1*  %files -n %{libname}
208  %_mandir/man1/pcretest.1*  %{_libdir}/libpcre.so.%{pcre_major}*
 %_bindir/pcregrep    
 %_bindir/pcretest  
209    
210    %files -n %{libname16}
211    %{_libdir}/libpcre16.so.%{pcrecpp_major}*
212    
213  #  %files -n %{libname32}
214  %files -n %{libname}  %{_libdir}/libpcre32.so.%{pcrecpp_major}*
215  %defattr(-,root,root)  
216  %doc AUTHORS COPYING LICENCE NEWS README  %files -n %{libnamecpp}
217    %{_libdir}/libpcrecpp.so.%{pcrecpp_major}*
218    
219  /%_lib/lib*.so.%{major}*  %if %{build_pcreposix_compat}
220  %_libdir/lib*.so.%{major}*  %files -n %{libnameposix_compat}
221  %_libdir/libpcreposix.so.%{pcreposix_major}*  %{_libdir}/libpcreposix.so.%{pcreposix_compat_major}*
222    %endif
223    
224    %files -n %{libnameposix}
225    %{_libdir}/libpcreposix.so.%{pcreposix_major}*
226    
 #  
227  %files -n %{develname}  %files -n %{develname}
 %defattr(-,root,root)  
228  %doc doc/html  %doc doc/html
229  %doc ChangeLog  %doc ChangeLog
230    %{_libdir}/libpcre.so
231  %_libdir/lib*.a  %{_libdir}/libpcre16.so
232  %_libdir/lib*.la  %{_libdir}/libpcre32.so
233  %_libdir/lib*.so  %{_includedir}/pcre.h
234  %_includedir/*.h  %{_includedir}/pcre_*.h
235  %_libdir/pkgconfig/libpcre.pc  %{_libdir}/pkgconfig/libpcre.pc
236  %_libdir/pkgconfig/libpcrecpp.pc  %{_libdir}/pkgconfig/libpcre16.pc
237  %_libdir/pkgconfig/libpcreposix.pc  %{_libdir}/pkgconfig/libpcre32.pc
238    %{_bindir}/pcre-config
 %_bindir/pcre-config  
239  %multiarch %{multiarch_bindir}/pcre-config  %multiarch %{multiarch_bindir}/pcre-config
240    %{_mandir}/man1/pcre-config.1*
241  %_mandir/man1/pcre-config.1*  %{_mandir}/man3/*.3*
242  %_mandir/man3/*.3*  %exclude %{_libdir}/libpcreposix.so
243    %exclude %{_mandir}/man3/pcreposix.3*
244    
245    %files -n %{develcpp}
246    %{_includedir}/pcrecpp*.h
247    %{_libdir}/libpcrecpp.so
248    %{_libdir}/pkgconfig/libpcrecpp.pc
249    %{_mandir}/man3/pcrecpp.3*
250    
251    %files -n %{develposix}
252    %{_includedir}/pcreposix.h
253    %{_libdir}/libpcreposix.so
254    %{_libdir}/pkgconfig/libpcreposix.pc
255    %{_mandir}/man3/pcreposix.3*

Legend:
Removed from v.581  
changed lines
  Added in v.798078

  ViewVC Help
Powered by ViewVC 1.1.30