From: Elan Ruusamäe Date: Tue, 26 Feb 2013 18:51:33 +0000 (+0200) Subject: new, version 20130115 X-Git-Tag: auto/th/re2-20130115-1~1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=47fd5f8c94802dcdaa93dc6fb09a93d6ac146f62;p=packages%2Fre2.git new, version 20130115 based on fedora package ftp://ftp.icm.edu.pl/vol/rzm2/linux-fedora-secondary/development/rawhide/source/SRPMS/r/re2-20130115-2.fc19.src.rpm --- 47fd5f8c94802dcdaa93dc6fb09a93d6ac146f62 diff --git a/re2.spec b/re2.spec new file mode 100644 index 0000000..ada284f --- /dev/null +++ b/re2.spec @@ -0,0 +1,101 @@ +# +# Conditional build: +%bcond_without tests # build without tests +%bcond_without static_libs # don't build static libraries + +Summary: C++ fast alternative to backtracking RE engines +Name: re2 +Version: 20130115 +Release: 1 +License: BSD +Group: Libraries +URL: http://code.google.com/p/re2/ +Source0: http://re2.googlecode.com/files/%{name}-%{version}.tgz +# Source0-md5: ef66646926e6cb8f11f277b286eac579 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +RE2 is a C++ library providing a fast, safe, thread-friendly +alternative to backtracking regular expression engines like those used +in PCRE, Perl, and Python. + +Backtracking engines are typically full of features and convenient +syntactic sugar but can be forced into taking exponential amounts of +time on even small inputs. + +In contrast, RE2 uses automata theory to guarantee that regular +expression searches run in time linear in the size of the input, at +the expense of some missing features (e.g back references and +generalized assertions). + +%package devel +Summary: C++ header files and library symbolic links for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the C++ header files and symbolic links to the +shared libraries for %{name}. If you would like to develop programs +using %{name}, you will need to install %{name}-devel. + +%package static +Summary: Static %{name} library +Summary(pl.UTF-8): Statyczna biblioteka %{name} +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static %{name} library. + +%description static -l pl.UTF-8 +Statyczna biblioteka %{name}. + +%prep +%setup -q -n %{name} + +%build +# The -pthread flag issue has been submitted upstream: +# http://groups.google.com/forum/?fromgroups=#!topic/re2-dev/bkUDtO5l6Lo +%{__make} \ + CXX="%{__cxx}" \ + CXXFLAGS="%{rpmcxxflags}" \ + LDFLAGS="%{rpmldflags} -pthread" \ + includedir=%{_includedir} \ + libdir=%{_libdir} + +%if %{with tests} +%{__make} test \ + CXX="%{__cxx}" \ + CXXFLAGS="%{rpmcxxflags}" +%endif + +%install +rm -rf $RPM_BUILD_ROOT +%{__make} install \ + INSTALL="install -p" \ + includedir=%{_includedir} \ + libdir=%{_libdir} \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc AUTHORS CONTRIBUTORS LICENSE README +%attr(755,root,root) %{_libdir}/libre2.so.*.*.* +%ghost %{_libdir}/libre2.so.0 + +%files devel +%defattr(644,root,root,755) +%{_libdir}/libre2.so +%{_includedir}/re2 + +%if %{with static_libs} +%files static +%defattr(644,root,root,755) +%{_libdir}/libre2.a +%endif