pcre2/pcre2.spec
2017-02-04 19:22:10 +03:00

169 lines
4.8 KiB
RPMSpec

%define major 0
%define posixmajor 1
%define libname8 %mklibname pcre2-8_ %{major}
%define libname16 %mklibname pcre2-16_ %{major}
%define libname32 %mklibname pcre2-32_ %{major}
%define libnameposix %mklibname pcre2posix %{posixmajor}
%define devname %mklibname %{name} -d
Summary: Perl-compatible regular expression library
Name: pcre2
Version: 10.22
Release: 3
License: BSD
Group: System/Libraries
Url: http://www.pcre.org/
Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
# Do no set RPATH if libdir is not /usr/lib
Patch0: pcre2-10.10-Fix-multilib.patch
BuildRequires: readline-devel
%description
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
expression) library to provide an entirely new API.
PCRE2 is written in C, and it has its own API. There are three sets of
functions, one for the 8-bit library, which processes strings of bytes, one
for the 16-bit library, which processes strings of 16-bit values, and one for
the 32-bit library, which processes strings of 32-bit values. There are no C++
wrappers.
The distribution does contain a set of C wrapper functions for the 8-bit
library that are based on the POSIX regular expression API (see the pcre2posix
man page). These can be found in a library called libpcre2posix. Note that
this just provides a POSIX calling interface to PCRE2; the regular expressions
themselves still follow Perl syntax and semantics. The POSIX API is
restricted, and does not give full access to all of PCRE2's facilities.
#----------------------------------------------------------------------------
%package -n %{libname8}
Summary: Perl-compatible regular expression library
Group: System/Libraries
%description -n %{libname8}
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
expression) library to provide an entirely new API.
%files -n %{libname8}
%{_libdir}/libpcre2-8.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{libname16}
Summary: Perl-compatible regular expression library
Group: System/Libraries
%description -n %{libname16}
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
expression) library to provide an entirely new API.
%files -n %{libname16}
%{_libdir}/libpcre2-16.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{libname32}
Summary: Perl-compatible regular expression library
Group: System/Libraries
%description -n %{libname32}
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
expression) library to provide an entirely new API.
%files -n %{libname32}
%{_libdir}/libpcre2-32.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{libnameposix}
Summary: Perl-compatible regular expression library
Group: System/Libraries
%description -n %{libnameposix}
This package contains the shared library libpcre2-posix.
%files -n %{libnameposix}
%{_libdir}/libpcre2-posix.so.%{posixmajor}*
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: Development files for %{name}
Group: Development/C
Requires: %{libname8} = %{EVRD}
Requires: %{libname16} = %{EVRD}
Requires: %{libname32} = %{EVRD}
Requires: %{libnameposix} = %{EVRD}
Provides: %{name}-devel = %{EVRD}
%description -n %{devname}
Development files (headers, libraries for dynamic linking, documentation)
for %{name}. The header file for the POSIX-style functions is called
pcre2posix.h.
%files -n %{devname}
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*.h
%{_mandir}/man1/pcre2-config.*
%{_mandir}/man3/*
%{_bindir}/pcre2-config
#----------------------------------------------------------------------------
%package tools
Summary: Auxiliary utilities for %{name}
Group: Development/Tools
%description tools
Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
%files tools
%{_bindir}/pcre2grep
%{_bindir}/pcre2test
%{_mandir}/man1/pcre2grep.*
%{_mandir}/man1/pcre2test.*
#----------------------------------------------------------------------------
%prep
%setup -q
%patch0 -p1 -b .multilib
%build
# Because of multilib patch
libtoolize --copy --force
autoreconf -vif
%configure2_5x \
--enable-jit \
--enable-pcre2grep-jit \
--disable-bsr-anycrlf \
--disable-coverage \
--disable-ebcdic \
--disable-never-backslash-C \
--enable-newline-is-lf \
--enable-pcre2-8 \
--enable-pcre2-16 \
--enable-pcre2-32 \
--disable-pcre2test-libedit \
--enable-pcre2test-libreadline \
--disable-pcre2grep-libbz2 \
--disable-pcre2grep-libz \
--disable-rebuild-chartables \
--enable-shared \
--enable-stack-for-recursion \
--disable-static \
--enable-unicode \
--disable-valgrind
%make
%install
%makeinstall_std
# These are handled by %%doc in %%files
rm -rf %{buildroot}%{_docdir}/pcre2
%check
make check VERBOSE=yes