/[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 335530 by neoclust, Wed Dec 26 22:01:55 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 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 %{pcre_major}
10    %define libname32 %mklibname pcre 32 %{pcre_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.12  Version:        8.32
23  Release:        %mkrel 3  Release:        %mkrel 7
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.  
58    %description -n %{libname16}
59    This package contains the shared library libpcre.
60    
61    %package -n %{libname32}
62    Group:      System/Libraries
63    Summary:    Perl-compatible regular expression library
64    Requires(pre):  filesystem >= 2.1.9-18
65    Provides:   %{libname32_orig} = %{version}-%{release}
66    
67    %description -n %{libname32}
68    This package contains the shared library libpcre.
69    
70    %package -n     %{libnamecpp}
71    Group:          System/Libraries
72    Summary:        Perl-compatible regular expression library
73    Conflicts:      %{_lib}pcre0 < 8.21-3
74    
75    %description -n %{libnamecpp}
76    This package contains the shared library libpcrecpp.
77    
78    
79    %package -n     %{libnameposix}
80    Group:          System/Libraries
81    Summary:        Perl-compatible regular expression library
82    Conflicts:      %{_lib}pcre0 < 8.21-3
83    
84    %description -n %{libnameposix}
85    This package contains the shared library libpcreposix.
86    
87    
88    %package -n     %{libnameposix_compat}
89    Group:          System/Libraries
90    Summary:        Perl-compatible regular expression library
91    Conflicts:      %{_lib}pcre0 < 8.21-3
92    
93    %description -n %{libnameposix_compat}
94    This package contains the shared library libpcreposix compat.
95    
96    
97  %package -n     %{develname}  %package -n     %{develname}
98  Group:          Development/C  Group:          Development/C
99  Summary:        Headers and static lib for pcre development  Summary:        Headers and static lib for pcre development
100  Requires:       %{libname} = %{version}-%{release}  Requires:       %{libname} = %{version}-%{release}
101    Requires:   %{libname16} = %{version}-%{release}
102    Requires:   %{libname32} = %{version}-%{release}
103  Provides:       %{libname_orig}-devel = %{version}-%{release}  Provides:       %{libname_orig}-devel = %{version}-%{release}
104  Provides:       %{name}-devel = %{version}-%{release}  Provides:       %{name}-devel = %{version}-%{release}
105  Obsoletes:      %mklibname pcre 0 -d  Obsoletes:      %mklibname pcre 0 -d
 Conflicts:      pcre <= 4.0  
106    
107  %description -n %{develname}  %description -n %{develname}
108  Install this package if you want do compile applications using the pcre  Install this package if you want do compile applications using the pcre
109  library.  library.
110    
111  %prep  %package -n %{develcpp}
112    Group:          Development/C++
113    Summary:        Headers and static lib for pcrecpp development
114    Provides:       pcrecpp-devel = %{version}-%{release}
115    Requires:       %{libnamecpp} = %{version}-%{release}
116    Requires:       %{develname} = %{version}-%{release}
117    Conflicts:      pcre-devel < 8.32-4
118    
119    %description -n %{develcpp}
120    Install this package if you want do compile applications using the pcrecpp
121    library.
122    
123    %package -n %{develposix}
124    Group:          Development/C
125    Summary:        Headers and static lib for pcreposix development
126    Provides:       pcreposix-devel = %{version}-%{release}
127    Requires:       %{libnameposix} = %{version}-%{release}
128    Requires:       %{develname} = %{version}-%{release}
129    Conflicts:      pcre-devel < 8.32-4
130    
131    %description -n %{develposix}
132    Install this package if you want do compile applications using the pcre
133    library.
134    
135    The header file for the POSIX-style functions is called pcreposix.h. The
136    official POSIX name is regex.h, but I didn't want to risk possible problems
137    with existing files of that name by distributing it that way. To use it with an
138    existing program that uses the POSIX API, it will have to be renamed or pointed
139    at by a link.
140    
141    %prep
142  %setup -q  %setup -q
143  %patch1 -p1 -b .detect_into_kdelibs  %patch1 -p1 -b .detect_into_kdelibs
144  %patch2 -p0  %patch2 -p0
 #%patch3 -p0 -b .format_not_a_string_literal_and_no_format_arguments  
   
145    
146  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
147    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
# Line 83  dirs="." Line 159  dirs="."
159  for i in $dirs; do  for i in $dirs; do
160    cd $i    cd $i
161    mkdir -p m4    mkdir -p m4
162    autoreconf -fis    autoreconf -fi
163    %configure2_5x --enable-utf8 --enable-unicode-properties    %configure2_5x \
164            --disable-static \
165            --enable-utf \
166            --enable-unicode-properties \
167        --enable-pcre8 \
168        --enable-pcre16 \
169        --enable-pcre32 \
170            --enable-jit
171    %make    %make
172    cd -    cd -
173  done  done
# Line 99  export LC_ALL=C Line 182  export LC_ALL=C
182  make check  make check
183    
184  %install  %install
 rm -rf $RPM_BUILD_ROOT  
185  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
186  %makeinstall_std -C pcre-with-pcreposix_compat  %makeinstall_std -C pcre-with-pcreposix_compat
187  %endif  %endif
188  %makeinstall_std  %makeinstall_std
189    
190  %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}.* .  
191    
192  # Remove unwanted files  # Remove unwanted files
193  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}  rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
194  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}
195  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{pcretest.txt,README}  rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README}
196  rm -rf $RPM_BUILD_ROOT/%_docdir/pcre/html  rm -rf %{buildroot}%{_docdir}/pcre/html
197    rm -f %{buildroot}%{_libdir}/*.la
 %clean  
 rm -rf $RPM_BUILD_ROOT  
198    
199  %files  %files
200  %defattr(-,root,root)  %doc AUTHORS COPYING LICENCE NEWS README
201    %{_mandir}/man1/pcregrep.1*
202    %{_mandir}/man1/pcretest.1*
203    %{_bindir}/pcregrep  
204    %{_bindir}/pcretest
205    
206  %_mandir/man1/pcregrep.1*  %files -n %{libname}
207  %_mandir/man1/pcretest.1*  %{_libdir}/libpcre.so.%{pcre_major}*
 %_bindir/pcregrep    
 %_bindir/pcretest  
208    
209    %files -n %{libname16}
210    %{_libdir}/libpcre16.so.%{pcrecpp_major}*
211    
212  #  %files -n %{libname32}
213  %files -n %{libname}  %{_libdir}/libpcre32.so.%{pcrecpp_major}*
214  %defattr(-,root,root)  
215  %doc AUTHORS COPYING LICENCE NEWS README  %files -n %{libnamecpp}
216    %{_libdir}/libpcrecpp.so.%{pcrecpp_major}*
217    
218  /%_lib/lib*.so.%{major}*  %if %{build_pcreposix_compat}
219  %_libdir/lib*.so.%{major}*  %files -n %{libnameposix_compat}
220  %_libdir/libpcreposix.so.%{pcreposix_major}*  %{_libdir}/libpcreposix.so.%{pcreposix_compat_major}*
221    %endif
222    
223    %files -n %{libnameposix}
224    %{_libdir}/libpcreposix.so.%{pcreposix_major}*
225    
 #  
226  %files -n %{develname}  %files -n %{develname}
 %defattr(-,root,root)  
227  %doc doc/html  %doc doc/html
228  %doc ChangeLog  %doc ChangeLog
229    %{_libdir}/libpcre.so
230  %_libdir/lib*.a  %{_libdir}/libpcre16.so
231  %_libdir/lib*.la  %{_libdir}/libpcre32.so
232  %_libdir/lib*.so  %{_includedir}/pcre.h
233  %_includedir/*.h  %{_includedir}/pcre_*.h
234  %_libdir/pkgconfig/libpcre.pc  %{_libdir}/pkgconfig/libpcre.pc
235  %_libdir/pkgconfig/libpcrecpp.pc  %{_libdir}/pkgconfig/libpcre16.pc
236  %_libdir/pkgconfig/libpcreposix.pc  %{_libdir}/pkgconfig/libpcre32.pc
237    %{_bindir}/pcre-config
 %_bindir/pcre-config  
238  %multiarch %{multiarch_bindir}/pcre-config  %multiarch %{multiarch_bindir}/pcre-config
239    %{_mandir}/man1/pcre-config.1*
240  %_mandir/man1/pcre-config.1*  %{_mandir}/man3/*.3*
241  %_mandir/man3/*.3*  %exclude %{_libdir}/libpcreposix.so
242    %exclude %{_mandir}/man3/pcreposix.3*
243    
244    %files -n %{develcpp}
245    %{_includedir}/pcrecpp*.h
246    %{_libdir}/libpcrecpp.so
247    %{_libdir}/pkgconfig/libpcrecpp.pc
248    %{_mandir}/man3/pcrecpp.3*
249    
250    %files -n %{develposix}
251    %{_includedir}/pcreposix.h
252    %{_libdir}/libpcreposix.so
253    %{_libdir}/pkgconfig/libpcreposix.pc
254    %{_mandir}/man3/pcreposix.3*

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

  ViewVC Help
Powered by ViewVC 1.1.30