/[packages]/cauldron/pcre/current/SPECS/pcre.spec
ViewVC logotype

Annotation of /cauldron/pcre/current/SPECS/pcre.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 303179 - (hide annotations) (download)
Sun Oct 7 04:41:42 2012 UTC (7 years, 8 months ago) by luigiwalser
File size: 4404 byte(s)
- 8.31
- libpcre major is now 1
- update patches 2 and 4 (from oden)
- remove old conflicts

1 luigiwalser 303179 %define pcre_major 1
2     %define pcrecpp_major 0
3 blino 581 %define pcreposix_major 1
4     %define libname_orig lib%{name}
5 luigiwalser 303179 %define libname %mklibname pcre %{pcre_major}
6 blino 581 %define develname %mklibname -d pcre
7    
8     %define build_pcreposix_compat 1
9    
10     Summary: Perl-compatible regular expression library
11     Name: pcre
12 luigiwalser 303179 Version: 8.31
13     Release: %mkrel 1
14 blino 581 License: BSD-Style
15     Group: File tools
16     URL: http://www.pcre.org/
17 fwang 187740 Source0: http://downloads.sourceforge.net/pcre/%{name}-%{version}.tar.bz2
18     Source1: http://downloads.sourceforge.net/pcre/%{name}-%{version}.tar.bz2.sig
19 blino 581 Requires: %{libname} = %{version}-%{release}
20     BuildRequires: automake
21     Patch1: pcre-0.6.5-fix-detect-into-kdelibs.patch
22     Patch2: pcre-linkage_fix.diff
23     # from debian:
24     Patch4: pcre-pcreposix-glibc-conflict.patch
25    
26     %description
27     PCRE has its own native API, but a set of "wrapper" functions that are based on
28     the POSIX API are also supplied in the library libpcreposix. Note that this
29     just provides a POSIX calling interface to PCRE: the regular expressions
30     themselves still follow Perl syntax and semantics.
31     This package contains a grep variant based on the PCRE library.
32    
33     %package -n %{libname}
34     Group: System/Libraries
35     Summary: Perl-compatible regular expression library
36 colin 273158 Requires(pre): filesystem >= 2.1.9-18
37 blino 581 Provides: %{libname_orig} = %{version}-%{release}
38    
39     %description -n %{libname}
40     PCRE has its own native API, but a set of "wrapper" functions that are based on
41     the POSIX API are also supplied in the library libpcreposix. Note that this
42     just provides a POSIX calling interface to PCRE: the regular expressions
43     themselves still follow Perl syntax and semantics. The header file
44     for the POSIX-style functions is called pcreposix.h. The official POSIX name is
45     regex.h, but I didn't want to risk possible problems with existing files of
46     that name by distributing it that way. To use it with an existing program that
47     uses the POSIX API, it will have to be renamed or pointed at by a link.
48    
49     %package -n %{develname}
50     Group: Development/C
51     Summary: Headers and static lib for pcre development
52     Requires: %{libname} = %{version}-%{release}
53     Provides: %{libname_orig}-devel = %{version}-%{release}
54     Provides: %{name}-devel = %{version}-%{release}
55     Obsoletes: %mklibname pcre 0 -d
56    
57     %description -n %{develname}
58     Install this package if you want do compile applications using the pcre
59     library.
60    
61     %prep
62    
63     %setup -q
64     %patch1 -p1 -b .detect_into_kdelibs
65     %patch2 -p0
66    
67     %if %{build_pcreposix_compat}
68     # pcre-pcreposix-glibc-conflict patch below breaks compatibility,
69     # create a libpcreposix.so.0 without the patch
70     cp -a . ../pcre-with-pcreposix_compat && mv ../pcre-with-pcreposix_compat .
71     %endif
72     %patch4 -p1 -b .symbol-conflict
73    
74     %build
75     %if %{build_pcreposix_compat}
76     dirs="pcre-with-pcreposix_compat ."
77     %else
78     dirs="."
79     %endif
80     for i in $dirs; do
81     cd $i
82     mkdir -p m4
83 fwang 134303 autoreconf -fi
84 blino 581 %configure2_5x --enable-utf8 --enable-unicode-properties
85     %make
86     cd -
87     done
88    
89     %check
90     export LC_ALL=C
91     # Tests, patch out actual pcre_study_size in expected results
92     #echo 'int main() { printf("%d", sizeof(pcre_study_data)); return 0; }' | \
93     #%{__cc} -xc - -include "pcre_internal.h" -I. -o study_size
94     #STUDY_SIZE=`./study_size`
95     #perl -pi -e "s,(Study size\s+=\s+)\d+,\${1}$STUDY_SIZE," testdata/testoutput*
96     make check
97    
98     %install
99     %if %{build_pcreposix_compat}
100     %makeinstall_std -C pcre-with-pcreposix_compat
101     %endif
102     %makeinstall_std
103    
104 fwang 170356 %multiarch_binaries %{buildroot}%{_bindir}/pcre-config
105 blino 581
106     # Remove unwanted files
107 luigiwalser 303179 rm -f %{buildroot}/%{_docdir}/pcre/{AUTHORS,ChangeLog,COPYING,LICENCE,NEWS}
108     rm -f %{buildroot}/%{_docdir}/pcre/{pcre-config.txt,pcre.txt,pcregrep.txt}
109     rm -f %{buildroot}/%{_docdir}/pcre/{pcretest.txt,README}
110     rm -rf %{buildroot}/%{_docdir}/pcre/html
111 fwang 170356 rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/*.a
112 blino 581
113     %files
114 luigiwalser 303179 %{_mandir}/man1/pcregrep.1*
115     %{_mandir}/man1/pcretest.1*
116     %{_bindir}/pcregrep
117     %{_bindir}/pcretest
118 blino 581
119     %files -n %{libname}
120     %doc AUTHORS COPYING LICENCE NEWS README
121 luigiwalser 303179 %{_libdir}/libpcre.so.%{pcre_major}*
122     %{_libdir}/libpcrecpp.so.%{pcrecpp_major}*
123     %if %{build_pcreposix_compat}
124     %{_libdir}/libpcreposix.so.0*
125     %endif
126     %{_libdir}/libpcreposix.so.%{pcreposix_major}*
127 blino 581
128     %files -n %{develname}
129     %doc doc/html
130     %doc ChangeLog
131 luigiwalser 303179 %{_libdir}/lib*.so
132     %{_includedir}/*.h
133     %{_libdir}/pkgconfig/libpcre.pc
134     %{_libdir}/pkgconfig/libpcrecpp.pc
135     %{_libdir}/pkgconfig/libpcreposix.pc
136     %{_bindir}/pcre-config
137 blino 581 %multiarch %{multiarch_bindir}/pcre-config
138 luigiwalser 303179 %{_mandir}/man1/pcre-config.1*
139     %{_mandir}/man3/*.3*

  ViewVC Help
Powered by ViewVC 1.1.28