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

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

  ViewVC Help
Powered by ViewVC 1.1.30