SHA256
1
0
forked from pool/pcre2
pcre2/pcre2.spec

258 lines
7.3 KiB
RPMSpec

#
# spec file for package pcre2
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: pcre2
Version: 10.10
Release: 0
Summary: A library for Perl-compatible regular expressions
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Url: http://www.pcre.org/
#SVN-Clone: svn://vcs.exim.org/pcre/code/trunk
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
Source2: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2.sig
Source3: %{name}.keyring
Source4: baselibs.conf
#PATCH-FIX-OPENSUSE tchvatal@suse.cz upstream thinks it is good idea to use rpath, taken from RH
Patch1: pcre2-10.10-multilib.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
%package devel
Summary: A library for Perl-compatible regular expressions
Group: Development/Libraries/C and C++
Requires: libpcre2-16-0 = %{version}
Requires: libpcre2-32-0 = %{version}
Requires: libpcre2-8-0 = %{version}
Requires: libpcre2-posix0 = %{version}
Requires: libstdc++-devel
%description devel
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
%package devel-static
Summary: A library for Perl-compatible regular expressions
Group: Development/Libraries/C and C++
Requires: pcre2-devel = %{version}
%description devel-static
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
This package contains static versions of the PCRE2 libraries.
%package -n libpcre2-8-0
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcre2-8-0
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
This PCRE2 library variant supports 8-bit and UTF-8 strings.
(See also libpcre2-16 and libpcre2-32)
%package -n libpcre2-16-0
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcre2-16-0
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
libpcre2-16 supports 16-bit and UTF-16 strings.
%package -n libpcre2-32-0
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcre2-32-0
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
libpcre2-32 supports 32-bit and UTF-32 strings.
%package -n libpcre2-posix0
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcre2-posix0
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
pcre2-posix provides a POSIX-compatible API to the PCRE2 engine.
%package doc
Summary: A library for Perl-compatible regular expressions
Group: Documentation/HTML
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description doc
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
%package tools
Summary: A library for Perl-compatible regular expressions
Group: Productivity/Text/Utilities
Recommends: %{name}-doc
%description tools
The PCRE2 library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
PCRE2 is a re-working of the original PCRE library to provide an entirely new
API.
%prep
%setup -q
%patch1 -p1
%build
# Available JIT archs see sljit/sljitConfig.h
autoreconf -fiv
export LDFLAGS="-Wl,-z,relro,-z,now"
%configure \
%ifarch %ix86 x86_64 %arm ppc ppc64 ppc64le mips sparc
--enable-jit \
%endif
--enable-static \
--with-link-size=2 \
--with-match-limit=10000000 \
--enable-newline-is-lf \
--enable-pcre2-16 \
--enable-pcre2-32 \
--enable-unicode
make %{?_smp_mflags} V=1
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mkdir -p %{buildroot}/%{_defaultdocdir}
mv %{buildroot}%{_datadir}/doc/pcre2 %{buildroot}/%{_defaultdocdir}/pcre2-doc
#empty dependecy_libs
find %{buildroot} -type f -name "*.la" -delete -print
%check
export LANG=POSIX
make check -j1
%post -n libpcre2-8-0 -p /sbin/ldconfig
%postun -n libpcre2-8-0 -p /sbin/ldconfig
%post -n libpcre2-16-0 -p /sbin/ldconfig
%postun -n libpcre2-16-0 -p /sbin/ldconfig
%post -n libpcre2-32-0 -p /sbin/ldconfig
%postun -n libpcre2-32-0 -p /sbin/ldconfig
%post -n libpcre2-posix0 -p /sbin/ldconfig
%postun -n libpcre2-posix0 -p /sbin/ldconfig
%files -n libpcre2-8-0
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog LICENCE NEWS README
%{_libdir}/libpcre2-8.so.*
%files -n libpcre2-16-0
%defattr(-,root,root)
%{_libdir}/libpcre2-16.so.*
%files -n libpcre2-32-0
%defattr(-,root,root)
%{_libdir}/libpcre2-32.so.*
%files -n libpcre2-posix0
%defattr(-,root,root)
%{_libdir}/libpcre2-posix.so.*
%files tools
%defattr(-,root,root)
%{_bindir}/pcre2grep
%{_bindir}/pcre2test
%{_mandir}/man1/pcre2grep.*
%{_mandir}/man1/pcre2test.*
%files doc
%defattr(-,root,root)
%doc doc/html doc/*.txt
%files devel
%defattr(-,root,root)
%{_bindir}/pcre2-config
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/libpcre2-8.pc
%{_libdir}/pkgconfig/libpcre2-16.pc
%{_libdir}/pkgconfig/libpcre2-32.pc
%{_libdir}/pkgconfig/libpcre2-posix.pc
%{_mandir}/man1/pcre2-config.*
%{_mandir}/man3/*.gz
%files devel-static
%defattr(-,root,root)
%{_libdir}/*.a
%changelog