File pcre.spec of Package pcre

#
# spec file for package pcre
#
# Copyright (c) 2017 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:           pcre
Version:        8.41
Release:        0
Summary:	PERL 5 regular expression pattern matching
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        BSD-3-Clause
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group:          System/Libraries
Url:            https://sourceforge.net/projects/pcre/
Source:         https://sourceforge.net/projects/pcre/files/pcre/8.41/%{name}-%{version}.tar.bz2
BuildRequires:  make
BuildRequires:	gcc-c++
BuildRequires:	zlib-devel
BuildRequires:	readline-devel
BuildRequires:	libbz2-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
PCRE provides PERL 5 stlye regular expression pattern matching.

%package -n libpcre1
Group:		System/Libraries
Summary:	PERL 5 regular expression pattern matching

%description -n libpcre1
PCRE provides PERL 5 style regular expression pattern matching

%package -n libpcre16-0
Group:		System/Libraries
Summary:	PERL 5 regular expression pattern matching

%description -n libpcre16-0
16 Bit PCRE provides PERL 5 style regular expression pattern matching

%package -n libpcre32-0
Group:		System/Libraries
Summary:	PERL 5 regular expression pattern matching

%description -n libpcre32-0
32 Bit PCRE provides PERL 5 style regular expression pattern matching

%package -n libpcrecpp0
Group:		System/Libraries
Summary:	PERL 5 regular expression pattern matching

%description -n libpcrecpp0
C++ bindings for  PCRE

%package -n libpcreposix0
Group:		System/Libraries
Summary:	PERL 5 regular expression pattern matching

%description -n libpcreposix0
POSIX bindings for PCRE

%package devel
Group:		Development/Libraries
Summary:	PERL 5 regular expression pattern matching
Requires:	lib%{name}1 = %{version}

%description devel
Development files for libpcre3, a library providing PERL 5 regular expression matching

%prep
%setup -q

%build
%configure \
	--docdir=%{_docdir}/pcre \
	--disable-static \
	--enable-pcre16 \
	--enable-pcre32 \
	--enable-utf \
	--enable-pcregrep-libz \
	--enable-pcregrep-libbz2 \
	--enable-pcretest-libreadline
make %{?_smp_mflags}

%install
%make_install

%post -n libpcre1 -p /sbin/ldconfig
%postun -n libpcre1 -p /sbin/ldconfig
%post -n libpcre16-0 -p /sbin/ldconfig
%postun -n libpcre16-0 -p /sbin/ldconfig
%post -n libpcre32-0 -p /sbin/ldconfig
%postun -n libpcre32-0 -p /sbin/ldconfig
%post -n libpcrecpp0 -p /sbin/ldconfig
%postun -n libpcrecpp0 -p /sbin/ldconfig
%post -n libpcreposix0 -p /sbin/ldconfig
%postun -n libpcreposix0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc %{_docdir}/pcre
%{_bindir}/pcregrep
%{_bindir}/pcretest
%{_mandir}/man1/pcregrep.*
%{_mandir}/man1/pcretest.*
%{_mandir}/man3/*

%files -n libpcre1
%defattr(-,root,root)
%{_libdir}/libpcre.so.*

%files -n libpcre16-0
%defattr(-,root,root)
%{_libdir}/libpcre16.so.*

%files -n libpcre32-0
%defattr(-,root,root)
%{_libdir}/libpcre32.so.*

%files -n libpcrecpp0
%defattr(-,root,root)
%{_libdir}/libpcrecpp.so.*

%files -n libpcreposix0
%defattr(-,root,root)
%{_libdir}/libpcreposix.so.*

%files devel
%defattr(-,root,root)
%{_bindir}/pcre-config
%{_includedir}/pcre*
%{_libdir}/libpcre.so
%{_libdir}/libpcre16.so
%{_libdir}/libpcre32.so
%{_libdir}/libpcrecpp.so
%{_libdir}/libpcreposix.so
%{_libdir}/*.la
%{_libdir}/pkgconfig/*
%{_mandir}/man1/pcre-config.*

%changelog

openSUSE Build Service is sponsored by