/[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 170356 by fwang, Mon Nov 21 06:42:24 2011 UTC revision 584398 by fwang, Thu Feb 6 08:04:22 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 pcreposix_compat_major 0
5  %define libname_orig    lib%{name}  %define libname_orig    lib%{name}
6  %define libname %mklibname pcre %{major}  %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    
18  %define build_pcreposix_compat 1  %define build_pcreposix_compat 1
19    
20  Summary:        Perl-compatible regular expression library  Summary:        Perl-compatible regular expression library
21  Name:           pcre  Name:           pcre
22  Version:        8.20  Version:        8.34
23  Release:        %mkrel 2  Release:        %mkrel 1
24  License:        BSD-Style  License:        BSD-Style
25  Group:          File tools  Group:          File tools
26  URL:            http://www.pcre.org/  URL:            http://www.pcre.org/
27  Source0:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%name-%version.tar.bz2  Source0:        http://downloads.sourceforge.net/pcre/%{name}-%{version}.tar.bz2
28  Source1:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%name-%version.tar.bz2.sig  Source1:        http://downloads.sourceforge.net/pcre/%{name}-%{version}.tar.bz2.sig
29  Requires:       %{libname} = %{version}-%{release}  Requires:       %{libname} = %{version}-%{release}
30  BuildRequires:  automake  BuildRequires:  automake
31  Patch1:         pcre-0.6.5-fix-detect-into-kdelibs.patch  Patch1:         pcre-0.6.5-fix-detect-into-kdelibs.patch
32  Patch2:         pcre-linkage_fix.diff  Patch2:         pcre-linkage_fix.diff
 Patch3:         pcre-7.8-format_not_a_string_literal_and_no_format_arguments.diff  
33  # from debian:  # from debian:
34  Patch4:         pcre-pcreposix-glibc-conflict.patch  Patch4:         pcre-pcreposix-glibc-conflict.patch
35    
# Line 33  This package contains a grep variant bas Line 43  This package contains a grep variant bas
43  %package -n     %{libname}  %package -n     %{libname}
44  Group:          System/Libraries  Group:          System/Libraries
45  Summary:        Perl-compatible regular expression library  Summary:        Perl-compatible regular expression library
46    Requires(pre):  filesystem >= 2.1.9-18
47  Provides:       %{libname_orig} = %{version}-%{release}  Provides:       %{libname_orig} = %{version}-%{release}
 Conflicts:      pcre <= 4.0  
48    
49  %description -n %{libname}  %description -n %{libname}
50  PCRE has its own native API, but a set of "wrapper" functions that are based on  This package contains the shared library libpcre.
51  the POSIX API are also supplied in the library libpcreposix. Note that this  
52  just provides a POSIX calling interface to PCRE: the regular expressions  %package -n %{libname16}
53  themselves still follow Perl syntax and semantics. The header file  Group:      System/Libraries
54  for the POSIX-style functions is called pcreposix.h. The official POSIX name is  Summary:    Perl-compatible regular expression library
55  regex.h, but I didn't want to risk possible problems with existing files of  Requires(pre):  filesystem >= 2.1.9-18
56  that name by distributing it that way. To use it with an existing program that  Provides:   %{libname16_orig} = %{version}-%{release}
57  uses the POSIX API, it will have to be renamed or pointed at by a link.  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}  %package -n     %{develname}
100  Group:          Development/C  Group:          Development/C
101  Summary:        Headers and static lib for pcre development  Summary:        Headers and static lib for pcre development
102  Requires:       %{libname} = %{version}-%{release}  Requires:       %{libname} = %{version}-%{release}
103    Requires:   %{libname16} = %{version}-%{release}
104    Requires:   %{libname32} = %{version}-%{release}
105  Provides:       %{libname_orig}-devel = %{version}-%{release}  Provides:       %{libname_orig}-devel = %{version}-%{release}
106  Provides:       %{name}-devel = %{version}-%{release}  Provides:       %{name}-devel = %{version}-%{release}
107  Obsoletes:      %mklibname pcre 0 -d  Obsoletes:      %mklibname pcre 0 -d
 Conflicts:      pcre <= 4.0  
108    
109  %description -n %{develname}  %description -n %{develname}
110  Install this package if you want do compile applications using the pcre  Install this package if you want do compile applications using the pcre
111  library.  library.
112    
113  %prep  %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  %setup -q
145  %patch1 -p1 -b .detect_into_kdelibs  %patch1 -p1 -b .detect_into_kdelibs
146  %patch2 -p0  %patch2 -p0
147    
   
148  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
149    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
150    # create a libpcreposix.so.0 without the patch    # create a libpcreposix.so.0 without the patch
# Line 83  for i in $dirs; do Line 162  for i in $dirs; do
162    cd $i    cd $i
163    mkdir -p m4    mkdir -p m4
164    autoreconf -fi    autoreconf -fi
165    %configure2_5x --enable-utf8 --enable-unicode-properties    %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    %make
174    cd -    cd -
175  done  done
# Line 105  make check Line 191  make check
191    
192  %multiarch_binaries %{buildroot}%{_bindir}/pcre-config  %multiarch_binaries %{buildroot}%{_bindir}/pcre-config
193    
 mkdir -p %{buildroot}/%_lib  
 mv %{buildroot}/%_libdir/lib%{name}.so.%{major}.* $RPM_BUILD_ROOT/%_lib  
 cd %{buildroot}/%_libdir  
 ln -s ../../%_lib/lib%{name}.so.%{major}.* .  
   
194  # Remove unwanted files  # Remove unwanted files
195  rm -f %{buildroot}/%_docdir/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}  rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
196  rm -f %{buildroot}/%_docdir/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt}  rm -f %{buildroot}%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt}
197  rm -f %{buildroot}/%_docdir/pcre/{pcretest.txt,README}  rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README}
198  rm -rf %{buildroot}/%_docdir/pcre/html  rm -rf %{buildroot}%{_docdir}/pcre/html
199  rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/*.a  rm -f %{buildroot}%{_libdir}/*.la
200    
201  %files  %files
202  %_mandir/man1/pcregrep.1*  %doc AUTHORS COPYING LICENCE NEWS README
203  %_mandir/man1/pcretest.1*  %{_mandir}/man1/pcregrep.1*
204  %_bindir/pcregrep    %{_mandir}/man1/pcretest.1*
205  %_bindir/pcretest  %{_bindir}/pcregrep  
206    %{_bindir}/pcretest
207    
 #  
208  %files -n %{libname}  %files -n %{libname}
209  %doc AUTHORS COPYING LICENCE NEWS README  %{_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  /%_lib/lib*.so.%{major}*  %if %{build_pcreposix_compat}
221  %_libdir/lib*.so.%{major}*  %files -n %{libnameposix_compat}
222  %_libdir/libpcreposix.so.%{pcreposix_major}*  %{_libdir}/libpcreposix.so.%{pcreposix_compat_major}*
223    %endif
224    
225    %files -n %{libnameposix}
226    %{_libdir}/libpcreposix.so.%{pcreposix_major}*
227    
 #  
228  %files -n %{develname}  %files -n %{develname}
229  %doc doc/html  %doc doc/html
230  %doc ChangeLog  %doc ChangeLog
231    %{_libdir}/libpcre.so
232  %_libdir/lib*.so  %{_libdir}/libpcre16.so
233  %_includedir/*.h  %{_libdir}/libpcre32.so
234  %_libdir/pkgconfig/libpcre.pc  %{_includedir}/pcre.h
235  %_libdir/pkgconfig/libpcrecpp.pc  %{_includedir}/pcre_*.h
236  %_libdir/pkgconfig/libpcreposix.pc  %{_libdir}/pkgconfig/libpcre.pc
237    %{_libdir}/pkgconfig/libpcre16.pc
238  %_bindir/pcre-config  %{_libdir}/pkgconfig/libpcre32.pc
239    %{_bindir}/pcre-config
240  %multiarch %{multiarch_bindir}/pcre-config  %multiarch %{multiarch_bindir}/pcre-config
241    %{_mandir}/man1/pcre-config.1*
242  %_mandir/man1/pcre-config.1*  %{_mandir}/man3/*.3*
243  %_mandir/man3/*.3*  %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*

Legend:
Removed from v.170356  
changed lines
  Added in v.584398

  ViewVC Help
Powered by ViewVC 1.1.30