/[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 134303 by fwang, Thu Aug 18 06:34:26 2011 UTC revision 323586 by fwang, Sat Dec 1 01:34:16 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 develposix %mklibname -d pcreposix
12    
13  %define build_pcreposix_compat 1  %define build_pcreposix_compat 1
14    
15  Summary:        Perl-compatible regular expression library  Summary:        Perl-compatible regular expression library
16  Name:           pcre  Name:           pcre
17  Version:        8.13  Version:        8.32
18  Release:        %mkrel 1  Release:        %mkrel 3
19  License:        BSD-Style  License:        BSD-Style
20  Group:          File tools  Group:          File tools
21  URL:            http://www.pcre.org/  URL:            http://www.pcre.org/
22  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
23  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
24  Requires:       %{libname} = %{version}-%{release}  Requires:       %{libname} = %{version}-%{release}
25  BuildRequires:  automake  BuildRequires:  automake
26  Patch1:         pcre-0.6.5-fix-detect-into-kdelibs.patch  Patch1:         pcre-0.6.5-fix-detect-into-kdelibs.patch
27  Patch2:         pcre-linkage_fix.diff  Patch2:         pcre-linkage_fix.diff
 Patch3:         pcre-7.8-format_not_a_string_literal_and_no_format_arguments.diff  
28  # from debian:  # from debian:
29  Patch4:         pcre-pcreposix-glibc-conflict.patch  Patch4:         pcre-pcreposix-glibc-conflict.patch
30    
# Line 33  This package contains a grep variant bas Line 38  This package contains a grep variant bas
38  %package -n     %{libname}  %package -n     %{libname}
39  Group:          System/Libraries  Group:          System/Libraries
40  Summary:        Perl-compatible regular expression library  Summary:        Perl-compatible regular expression library
41    Requires(pre):  filesystem >= 2.1.9-18
42  Provides:       %{libname_orig} = %{version}-%{release}  Provides:       %{libname_orig} = %{version}-%{release}
 Conflicts:      pcre <= 4.0  
43    
44  %description -n %{libname}  %description -n %{libname}
45  PCRE has its own native API, but a set of "wrapper" functions that are based on  This package contains the shared library libpcre.
46  the POSIX API are also supplied in the library libpcreposix. Note that this  
47  just provides a POSIX calling interface to PCRE: the regular expressions  
48  themselves still follow Perl syntax and semantics. The header file  %package -n     %{libnamecpp}
49  for the POSIX-style functions is called pcreposix.h. The official POSIX name is  Group:          System/Libraries
50  regex.h, but I didn't want to risk possible problems with existing files of  Summary:        Perl-compatible regular expression library
51  that name by distributing it that way. To use it with an existing program that  Conflicts:      %{_lib}pcre0 < 8.21-3
52  uses the POSIX API, it will have to be renamed or pointed at by a link.  
53    %description -n %{libnamecpp}
54    This package contains the shared library libpcrecpp.
55    
56    
57    %package -n     %{libnameposix}
58    Group:          System/Libraries
59    Summary:        Perl-compatible regular expression library
60    Conflicts:      %{_lib}pcre0 < 8.21-3
61    
62    %description -n %{libnameposix}
63    This package contains the shared library libpcreposix.
64    
65    
66    %package -n     %{libnameposix_compat}
67    Group:          System/Libraries
68    Summary:        Perl-compatible regular expression library
69    Conflicts:      %{_lib}pcre0 < 8.21-3
70    
71    %description -n %{libnameposix_compat}
72    This package contains the shared library libpcreposix compat.
73    
74    
75  %package -n     %{develname}  %package -n     %{develname}
76  Group:          Development/C  Group:          Development/C
77  Summary:        Headers and static lib for pcre development  Summary:        Headers and static lib for pcre development
78  Requires:       %{libname} = %{version}-%{release}  Requires:       %{libname} = %{version}-%{release}
79    Requires:       %{libnamecpp} = %{version}-%{release}
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 %{develposix}
89    Group:          Development/C
90    Summary:        Headers and static lib for pcreposix development
91    Provides:       pcreposix-devel = %{version}-%{release}
92    Requires:       %{libnameposix} = %{version}-%{release}
93    Requires:       %{develname} = %{version}-%{release}
94    Conflicts:      pcre-devel < 8.21-3
95    
96    %description -n %{develposix}
97    Install this package if you want do compile applications using the pcre
98    library.
99    
100    The header file for the POSIX-style functions is called pcreposix.h. The
101    official POSIX name is regex.h, but I didn't want to risk possible problems
102    with existing files of that name by distributing it that way. To use it with an
103    existing program that uses the POSIX API, it will have to be renamed or pointed
104    at by a link.
105    
106    %prep
107  %setup -q  %setup -q
108  %patch1 -p1 -b .detect_into_kdelibs  %patch1 -p1 -b .detect_into_kdelibs
109  %patch2 -p0  %patch2 -p0
110    
   
111  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
112    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,    # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
113    # create a libpcreposix.so.0 without the patch    # create a libpcreposix.so.0 without the patch
# Line 83  for i in $dirs; do Line 125  for i in $dirs; do
125    cd $i    cd $i
126    mkdir -p m4    mkdir -p m4
127    autoreconf -fi    autoreconf -fi
128    %configure2_5x --enable-utf8 --enable-unicode-properties    %configure2_5x \
129            --disable-static \
130            --enable-utf \
131            --enable-unicode-properties \
132            --enable-jit
133    %make    %make
134    cd -    cd -
135  done  done
# Line 98  export LC_ALL=C Line 144  export LC_ALL=C
144  make check  make check
145    
146  %install  %install
 rm -rf $RPM_BUILD_ROOT  
147  %if %{build_pcreposix_compat}  %if %{build_pcreposix_compat}
148  %makeinstall_std -C pcre-with-pcreposix_compat  %makeinstall_std -C pcre-with-pcreposix_compat
149  %endif  %endif
150  %makeinstall_std  %makeinstall_std
151    
152  %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}.* .  
153    
154  # Remove unwanted files  # Remove unwanted files
155  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}  rm -f %{buildroot}%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
156  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}
157  rm -f $RPM_BUILD_ROOT/%_docdir/pcre/{pcretest.txt,README}  rm -f %{buildroot}%{_docdir}/pcre/{pcretest.txt,README}
158  rm -rf $RPM_BUILD_ROOT/%_docdir/pcre/html  rm -rf %{buildroot}%{_docdir}/pcre/html
159    rm -f %{buildroot}%{_libdir}/*.la
160  %clean  rm -f %{buildroot}%{_bindir}/pcretest
 rm -rf $RPM_BUILD_ROOT  
161    
162  %files  %files
163  %defattr(-,root,root)  %doc AUTHORS COPYING LICENCE NEWS README
164    %{_mandir}/man1/pcregrep.1*
165  %_mandir/man1/pcregrep.1*  %{_mandir}/man1/pcretest.1*
166  %_mandir/man1/pcretest.1*  %{_bindir}/pcregrep  
167  %_bindir/pcregrep    #%{_bindir}/pcretest
 %_bindir/pcretest  
   
168    
 #  
169  %files -n %{libname}  %files -n %{libname}
170  %defattr(-,root,root)  %{_libdir}/libpcre.so.%{pcre_major}*
 %doc AUTHORS COPYING LICENCE NEWS README  
171    
172  /%_lib/lib*.so.%{major}*  %files -n %{libnamecpp}
173  %_libdir/lib*.so.%{major}*  %{_libdir}/libpcrecpp.so.%{pcrecpp_major}*
 %_libdir/libpcreposix.so.%{pcreposix_major}*  
174    
175    %if %{build_pcreposix_compat}
176    %files -n %{libnameposix_compat}
177    %{_libdir}/libpcreposix.so.%{pcreposix_compat_major}*
178    %endif
179    
180    %files -n %{libnameposix}
181    %{_libdir}/libpcreposix.so.%{pcreposix_major}*
182    
 #  
183  %files -n %{develname}  %files -n %{develname}
 %defattr(-,root,root)  
184  %doc doc/html  %doc doc/html
185  %doc ChangeLog  %doc ChangeLog
186    %{_libdir}/lib*.so
187  %_libdir/lib*.a  %{_includedir}/*.h
188  %_libdir/lib*.la  %{_libdir}/pkgconfig/libpcre.pc
189  %_libdir/lib*.so  %{_libdir}/pkgconfig/libpcrecpp.pc
190  %_includedir/*.h  %{_bindir}/pcre-config
 %_libdir/pkgconfig/libpcre.pc  
 %_libdir/pkgconfig/libpcrecpp.pc  
 %_libdir/pkgconfig/libpcreposix.pc  
   
 %_bindir/pcre-config  
191  %multiarch %{multiarch_bindir}/pcre-config  %multiarch %{multiarch_bindir}/pcre-config
192    %{_mandir}/man1/pcre-config.1*
193  %_mandir/man1/pcre-config.1*  %{_mandir}/man3/*.3*
194  %_mandir/man3/*.3*  %exclude %{_libdir}/libpcreposix.so
195    %exclude %{_mandir}/man3/pcreposix.3*
196    
197    %files -n %{develposix}
198    %{_libdir}/libpcreposix.so
199    %{_libdir}/pkgconfig/libpcreposix.pc
200    %{_mandir}/man3/pcreposix.3*

Legend:
Removed from v.134303  
changed lines
  Added in v.323586

  ViewVC Help
Powered by ViewVC 1.1.30