summaryrefslogtreecommitdiff
path: root/packaging/pcre.spec
blob: 93a7388bab43220419fbe169160a7ecb7779e02e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
%define keepstatic 1
Name:           pcre
Version:        8.31
Release:        0
License:        BSD-3-Clause
Summary:        A library for Perl-compatible regular expressions
Url:            ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
Group:          System/Libraries
Source:         ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
Source2:        baselibs.conf
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkg-config

%description
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.

%package        devel
Summary:        A library for Perl-compatible regular expressions
Group:          System/Libraries
Requires:       libpcre = %{version}
Requires:       libpcrecpp = %{version}
Requires:       libpcreposix = %{version}
Requires:       libstdc++-devel

%description devel
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.

%package        devel-static
Summary:        A library for Perl-compatible regular expressions
Group:          System/Libraries
Requires:       pcre-devel = %{version}

%description devel-static
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
This package contains static versions of the PCRE libraries.

%package -n libpcre
Summary:        A library for Perl-compatible regular expressions
Group:          System/Libraries
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n libpcre
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.

%package -n libpcreposix
Summary:        A library for Perl-compatible regular expressions
Group:          System/Libraries

%description -n libpcreposix
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.

%package -n libpcrecpp
Summary:        A library for Perl-compatible regular expressions
Group:          System/Libraries

%description -n libpcrecpp
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.

%package doc
Summary:        A library for Perl-compatible regular expressions
Group:          System/Libraries
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description doc
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.

%package tools
Summary:        A library for Perl-compatible regular expressions
Group:          System/Libraries

%description tools
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.

%prep
%setup -q

%build
# Available JIT archs see sljit/sljitConfig.h
autoreconf -fiv
%configure \
%ifarch %ix86 x86_64 %arm ppc ppc64 mips
	    --enable-jit \
%endif
	    --enable-static \
	    --with-link-size=2 \
	    --with-match-limit=10000000 \
	    --enable-newline-is-lf \
	    --enable-utf8 \
        --enable-unicode-properties
make %{?_smp_mflags}


%check
export LANG=POSIX
%ifarch %arm
make test || echo make test failed
%else
make test
%endif

%install
%make_install
mkdir -p %{buildroot}/%{_defaultdocdir}
mv %{buildroot}/usr/share/doc/pcre %{buildroot}/%{_defaultdocdir}/pcre-doc
rm -f %{buildroot}%{_libdir}/*.la


%post -n libpcre -p /sbin/ldconfig

%postun -n libpcre -p /sbin/ldconfig

%post -n libpcrecpp -p /sbin/ldconfig

%postun -n libpcrecpp -p /sbin/ldconfig

%post -n libpcreposix -p /sbin/ldconfig

%postun -n libpcreposix -p /sbin/ldconfig

%files -n libpcre
%{_libdir}/libpcre.so.*

%files -n libpcrecpp
%{_libdir}/libpcrecpp.so.*

%files -n libpcreposix
%{_libdir}/libpcreposix.so.*

%files tools
%{_bindir}/pcregrep
%{_bindir}/pcretest
%{_mandir}/man1/pcregrep.*
%{_mandir}/man1/pcretest.*

%files doc
%doc doc/html doc/*.txt

%files devel
%{_bindir}/pcre-config
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/libpcre.pc
%{_libdir}/pkgconfig/libpcrecpp.pc
%{_libdir}/pkgconfig/libpcreposix.pc
%{_mandir}/man1/pcre-config.*
%{_mandir}/man3/*.gz

%files devel-static
%{_libdir}/*.a