/[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 95272 by ahmad, Fri May 6 01:16:19 2011 UTC revision 323949 by fwang, Sat Dec 1 10:19:11 2012 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 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  %define develname %mklibname -d pcre
11    %define develcpp %mklibname -d pcrecpp
12    %define develposix %mklibname -d pcreposix
13    
14  %define build_pcreposix_compat 1  %define build_pcreposix_compat 1
15    
16  Summary:        Perl-compatible regular expression library  Summary:        Perl-compatible regular expression library
17  Name:           pcre  Name:           pcre
18  Version:        8.12  Version:        8.32
19  Release:        %mkrel 3  Release:        %mkrel 5
20  License:        BSD-Style  License:        BSD-Style
21  Group:          File tools  Group:          File tools
22  URL:            http://www.pcre.org/  URL:            http://www.pcre.org/
23  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
24  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
25  Requires:       %{libname} = %{version}-%{release}  Requires:       %{libname} = %{version}-%{release}
26  BuildRequires:  automake  BuildRequires:  automake
27  Patch1:         pcre-0.6.5-fix-detect-into-kdelibs.patch  Patch1:         pcre-0.6.5-fix-detect-into-kdelibs.patch
28  Patch2:         pcre-linkage_fix.diff  Patch2:         pcre-linkage_fix.diff
 Patch3:         pcre-7.8-format_not_a_string_literal_and_no_format_arguments.diff  
29  # from debian:  # from debian:
30  Patch4:         pcre-pcreposix-glibc-conflict.patch  Patch4:         pcre-pcreposix-glibc-conflict.patch
31    
# Line 33  This package contains a grep variant bas Line 39  This package contains a grep variant bas
39  %package -n     %{libname}  %package -n     %{libname}
40  Group:          System/Libraries  Group:          System/Libraries
41  Summary:        Perl-compatible regular expression library  Summary:        Perl-compatible regular expression library
42    Requires(pre):  filesystem >= 2.1.9-18
43  Provides:       %{libname_orig} = %{version}-%{release}  Provides:       %{libname_orig} = %{version}-%{release}
 Conflicts:      pcre <= 4.0  
44    
45  %description -n %{libname}  %description -n %{libname}
46  PCRE has its own native API, but a set of "wrapper" functions that are based on  This package contains the shared library libpcre.
47  the POSIX API are also supplied in the library libpcreposix. Note that this  
48  just provides a POSIX calling interface to PCRE: the regular expressions  
49  themselves still follow Perl syntax and semantics. The header file  %package -n     %{libnamecpp}
50  for the POSIX-style functions is called pcreposix.h. The official POSIX name is  Group:          System/Libraries
51  regex.h, but I didn't want to risk possible problems with existing files of  Summary:        Perl-compatible regular expression library
52  that name by distributing it that way. To use it with an existing program that  Conflicts:      %{_lib}pcre0 < 8.21-3
53  uses the POSIX API, it will have to be renamed or pointed at by a link.  
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  %package -n     %{develname}  %package -n     %{develname}
77  Group:          Development/C  Group:          Development/C
# Line 53  Requires:      %{libname} = %{version}-%{rele Line 80  Requires:      %{libname} = %{version}-%{rele
80  Provides:       %{libname_orig}-devel = %{version}-%{release}  Provides:       %{libname_orig}-devel = %{version}-%{release}
81  Provides:       %{name}-devel = %{version}-%{release}  Provides:       %{name}-devel = %{version}-%{release}
82  Obsoletes:      %mklibname pcre 0 -d  Obsoletes:      %mklibname pcre 0 -d
 Conflicts:      pcre <= 4.0  
83    
84  %description -n %{develname}  %description -n %{develname}
85  Install this package if you want do compile applications using the pcre  Install this package if you want do compile applications using the pcre
86  library.  library.
87    
88  %prep  %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    %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    Conflicts:      pcre-devel < 8.32-4
107    
108    %description -n %{develposix}
109    Install this package if you want do compile applications using the pcre
110    library.
111    
112    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    %prep
119  %setup -q  %setup -q
120  %patch1 -p1 -b .detect_into_kdelibs  %patch1 -p1 -b .detect_into_kdelibs
121  %patch2 -p0  %patch2 -p0
 #%patch3 -p0 -b .format_not_a_string_literal_and_no_format_arguments  
   
122    
123  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
124    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
# Line 83  dirs="." Line 136  dirs="."
136  for i in $dirs; do  for i in $dirs; do
137    cd $i    cd $i
138    mkdir -p m4    mkdir -p m4
139    autoreconf -fis    autoreconf -fi
140    %configure2_5x --enable-utf8 --enable-unicode-properties    %configure2_5x \
141            --disable-static \
142            --enable-utf \
143            --enable-unicode-properties \
144            --enable-jit
145    %make    %make
146    cd -    cd -
147  done  done
# Line 99  export LC_ALL=C Line 156  export LC_ALL=C
156  make check  make check
157    
158  %install  %install
 rm -rf $RPM_BUILD_ROOT  
159  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
160  %makeinstall_std -C pcre-with-pcreposix_compat  %makeinstall_std -C pcre-with-pcreposix_compat
161  %endif  %endif
162  %makeinstall_std  %makeinstall_std
163    
164  %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}.* .  
165    
166  # Remove unwanted files  # Remove unwanted files
167  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}  rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
168  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}
169  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{pcretest.txt,README}  rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README}
170  rm -rf $RPM_BUILD_ROOT/%_docdir/pcre/html  rm -rf %{buildroot}%{_docdir}/pcre/html
171    rm -f %{buildroot}%{_libdir}/*.la
 %clean  
 rm -rf $RPM_BUILD_ROOT  
172    
173  %files  %files
174  %defattr(-,root,root)  %doc AUTHORS COPYING LICENCE NEWS README
175    %{_mandir}/man1/pcregrep.1*
176  %_mandir/man1/pcregrep.1*  %{_mandir}/man1/pcretest.1*
177  %_mandir/man1/pcretest.1*  %{_bindir}/pcregrep  
178  %_bindir/pcregrep    %{_bindir}/pcretest
 %_bindir/pcretest  
   
179    
 #  
180  %files -n %{libname}  %files -n %{libname}
181  %defattr(-,root,root)  %{_libdir}/libpcre.so.%{pcre_major}*
182  %doc AUTHORS COPYING LICENCE NEWS README  
183    %files -n %{libnamecpp}
184    %{_libdir}/libpcrecpp.so.%{pcrecpp_major}*
185    
186  /%_lib/lib*.so.%{major}*  %if %{build_pcreposix_compat}
187  %_libdir/lib*.so.%{major}*  %files -n %{libnameposix_compat}
188  %_libdir/libpcreposix.so.%{pcreposix_major}*  %{_libdir}/libpcreposix.so.%{pcreposix_compat_major}*
189    %endif
190    
191    %files -n %{libnameposix}
192    %{_libdir}/libpcreposix.so.%{pcreposix_major}*
193    
 #  
194  %files -n %{develname}  %files -n %{develname}
 %defattr(-,root,root)  
195  %doc doc/html  %doc doc/html
196  %doc ChangeLog  %doc ChangeLog
197    %{_libdir}/libpcre.so
198  %_libdir/lib*.a  %{_includedir}/pcre.h
199  %_libdir/lib*.la  %{_includedir}/pcre_*.h
200  %_libdir/lib*.so  %{_libdir}/pkgconfig/libpcre.pc
201  %_includedir/*.h  %{_bindir}/pcre-config
 %_libdir/pkgconfig/libpcre.pc  
 %_libdir/pkgconfig/libpcrecpp.pc  
 %_libdir/pkgconfig/libpcreposix.pc  
   
 %_bindir/pcre-config  
202  %multiarch %{multiarch_bindir}/pcre-config  %multiarch %{multiarch_bindir}/pcre-config
203    %{_mandir}/man1/pcre-config.1*
204  %_mandir/man1/pcre-config.1*  %{_mandir}/man3/*.3*
205  %_mandir/man3/*.3*  %exclude %{_libdir}/libpcreposix.so
206    %exclude %{_mandir}/man3/pcreposix.3*
207    
208    %files -n %{develcpp}
209    %{_includedir}/pcrecpp*.h
210    %{_libdir}/libpcrecpp.so
211    %{_libdir}/pkgconfig/libpcrecpp.pc
212    %{_mandir}/man3/pcrecpp.3*
213    
214    %files -n %{develposix}
215    %{_includedir}/pcreposix.h
216    %{_libdir}/libpcreposix.so
217    %{_libdir}/pkgconfig/libpcreposix.pc
218    %{_mandir}/man3/pcreposix.3*

Legend:
Removed from v.95272  
changed lines
  Added in v.323949

  ViewVC Help
Powered by ViewVC 1.1.30