24ee1d8
%global longver 2016-04-01
24ee1d8
%global shortver %(echo %{longver}|sed 's|-||g')
24ee1d8
1a6aba3
Name:           re2
24ee1d8
Version:        %{shortver}
6e596b0
Release:        5%{?dist}
1a6aba3
Summary:        C++ fast alternative to backtracking RE engines
1a6aba3
Group:          System Environment/Libraries
1a6aba3
License:        BSD
24ee1d8
URL:            http://github.com/google/%{name}/
24ee1d8
Source0:        https://github.com/google/re2/archive/%{longver}.tar.gz
1a6aba3
1a6aba3
%description
1a6aba3
RE2 is a C++ library providing a fast, safe, thread-friendly alternative to
1a6aba3
backtracking regular expression engines like those used in PCRE, Perl, and
1a6aba3
Python.
1a6aba3
1a6aba3
Backtracking engines are typically full of features and convenient syntactic
1a6aba3
sugar but can be forced into taking exponential amounts of time on even small
1a6aba3
inputs.
1a6aba3
1a6aba3
In contrast, RE2 uses automata theory to guarantee that regular expression
1a6aba3
searches run in time linear in the size of the input, at the expense of some
1a6aba3
missing features (e.g back references and generalized assertions).
1a6aba3
1a6aba3
%package        devel
1a6aba3
Summary:        C++ header files and library symbolic links for %{name}
1a6aba3
Group:          Development/Libraries
1a6aba3
Requires:       %{name}%{?_isa} = %{version}-%{release}
1a6aba3
1a6aba3
%description    devel
1a6aba3
This package contains the C++ header files and symbolic links to the shared
1a6aba3
libraries for %{name}. If you would like to develop programs using %{name},
1a6aba3
you will need to install %{name}-devel.
1a6aba3
1a6aba3
%prep
24ee1d8
%setup -q -n %{name}-%{longver}
1a6aba3
1a6aba3
%build
1a6aba3
# The -pthread flag issue has been submitted upstream:
1a6aba3
# http://groups.google.com/forum/?fromgroups=#!topic/re2-dev/bkUDtO5l6Lo
794a49a
# The RPM macro for the linker flags does not exist on EPEL
794a49a
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
3734d08
CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++11"
1a6aba3
LDFLAGS="${LDFLAGS:-%__global_ldflags} -pthread"
1a6aba3
make %{?_smp_mflags} CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" includedir=%{_includedir} libdir=%{_libdir}
1a6aba3
1a6aba3
%install
1a6aba3
make install INSTALL="install -p" DESTDIR=$RPM_BUILD_ROOT includedir=%{_includedir} libdir=%{_libdir}
1a6aba3
1a6aba3
# Suppress the static library
1a6aba3
find $RPM_BUILD_ROOT -name 'lib%{name}.a' -exec rm -f {} \;
1a6aba3
1a6aba3
%check
42c7a40
make %{?_smp_mflags} shared-test
1a6aba3
1a6aba3
%post -p /sbin/ldconfig
1a6aba3
1a6aba3
%postun -p /sbin/ldconfig
1a6aba3
1a6aba3
%files
24ee1d8
%license LICENSE
24ee1d8
%doc AUTHORS CONTRIBUTORS README
1a6aba3
%{_libdir}/lib%{name}.so.*
1a6aba3
1a6aba3
%files devel
1a6aba3
%{_includedir}/%{name}
1a6aba3
%{_libdir}/lib%{name}.so
24ee1d8
%{_libdir}/pkgconfig/%{name}.pc
1a6aba3
1a6aba3
%changelog
6e596b0
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160401-5
6e596b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
6e596b0
0e50efc
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160401-4
0e50efc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0e50efc
62d9fc4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160401-3
62d9fc4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
62d9fc4
3734d08
* Fri Apr 29 2016 Tom Callaway <spot@fedoraproject.org> - 20160401-2
3734d08
- hardcode -std=c++11 for older compilers
3734d08
24ee1d8
* Fri Apr 29 2016 Tom Callaway <spot@fedoraproject.org> - 20160401-1
24ee1d8
- update to 20160401
24ee1d8
c37fc92
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 20131024-6
c37fc92
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c37fc92
29e7aed
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20131024-5
29e7aed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
29e7aed
867ad7f
* Wed Apr 15 2015 Petr Pisar <ppisar@redhat.com> - 20131024-4
867ad7f
- Rebuild owing to C++ ABI change in GCC-5 (bug #1195351)
867ad7f
7bc3354
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20131024-3
7bc3354
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
7bc3354
def44e6
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20131024-2
def44e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
def44e6
42c7a40
* Mon Nov 11 2013 Tom Callaway <spot@fedoraproject.org> - 20131024-1
42c7a40
- update to 20131024
42c7a40
- fix symbols export to stop test from failing
42c7a40
8160748
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20130115-3
8160748
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8160748
1a6aba3
* Sun Feb 17 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> 20130115-2
1a6aba3
- Took into account the feedback from review request (#868578).
1a6aba3
1a6aba3
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> 20130115-1
1a6aba3
- The download source comes now directly from the project.
1a6aba3
1a6aba3
* Thu Oct 25 2012 Denis Arnaud <denis.arnaud_fedora@m4x.org> 0.0.0-2
1a6aba3
- Took into account review request (#868578) feedback.
1a6aba3
1a6aba3
* Sat Oct 20 2012 Denis Arnaud <denis.arnaud_fedora@m4x.org> 0.0.0-1
1a6aba3
- RPM release for Fedora 18
1a6aba3