2010-01-07 13:03:51 +01:00
|
|
|
#
|
2012-02-08 17:21:03 +01:00
|
|
|
# spec file for package tre
|
2010-01-07 13:03:51 +01:00
|
|
|
#
|
2018-01-18 10:50:39 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2010-01-07 13:03:51 +01:00
|
|
|
#
|
|
|
|
# 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: tre
|
2014-04-24 10:34:32 +02:00
|
|
|
Version: 0.8.0_git201402282055
|
2012-05-08 14:49:36 +02:00
|
|
|
Release: 0
|
2010-01-07 13:03:51 +01:00
|
|
|
Summary: POSIX compatible regexp library with approximate matching
|
2012-05-08 14:49:36 +02:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: System/Libraries
|
2010-01-07 13:03:51 +01:00
|
|
|
Url: http://laurikari.net/tre/
|
2014-04-24 10:34:32 +02:00
|
|
|
# This source comes from https://github.com/laurikari/tre/, revision
|
|
|
|
# c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca. The previously released
|
|
|
|
# version 0.8.0 is old (2009) and no new released have been made by
|
|
|
|
# the author, so I'm terming this 0.8.0_git201402282055.
|
|
|
|
Source0: tre-%{version}.tar.bz2
|
|
|
|
Patch0: %{name}.diff
|
2014-05-08 13:54:25 +02:00
|
|
|
# Update the python build to fix wrong include and lib paths.
|
|
|
|
# See https://github.com/laurikari/tre/pull/19.
|
2014-04-24 10:34:32 +02:00
|
|
|
Patch1: %{name}-chicken.patch
|
2018-01-18 10:50:39 +01:00
|
|
|
Patch2: CVE-2016-8859.patch
|
2014-04-24 10:34:32 +02:00
|
|
|
BuildRequires: gettext-devel
|
|
|
|
BuildRequires: libtool
|
2012-02-08 17:21:03 +01:00
|
|
|
BuildRequires: pkgconfig
|
2014-04-24 10:34:32 +02:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-01-07 13:03:51 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
TRE is a lightweight, robust, and efficient POSIX compatible regexp
|
|
|
|
matching library with some exciting features such as approximate
|
|
|
|
matching.
|
|
|
|
|
|
|
|
%package -n libtre5
|
|
|
|
Summary: POSIX compatible regexp library with approximate matching
|
|
|
|
Group: System/Libraries
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Obsoletes: libtre
|
|
|
|
Provides: libtre
|
2014-04-24 11:10:59 +02:00
|
|
|
Recommends: %{name}-lang = %{version}
|
2010-01-07 13:03:51 +01:00
|
|
|
|
|
|
|
%description -n libtre5
|
|
|
|
TRE is a lightweight, robust, and efficient POSIX compatible regexp
|
|
|
|
matching library with some exciting features such as approximate
|
|
|
|
matching.
|
|
|
|
|
|
|
|
%post -n libtre5 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libtre5 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: POSIX compatible regexp library with approximate matching
|
|
|
|
Group: Development/Libraries/C and C++
|
2014-04-24 10:34:32 +02:00
|
|
|
Requires: libtre5 = %{version}
|
2010-01-07 13:03:51 +01:00
|
|
|
Obsoletes: libtre-devel
|
|
|
|
Provides: libtre-devel
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
TRE is a lightweight, robust, and efficient POSIX compatible regexp
|
|
|
|
matching library with some exciting features such as approximate
|
|
|
|
matching.
|
|
|
|
|
|
|
|
%package -n agrep
|
|
|
|
Summary: Another powerful grep with interesting features
|
|
|
|
Group: Productivity/Text/Utilities
|
|
|
|
|
|
|
|
%description -n agrep
|
|
|
|
agrep is another powerful grep which has the ability to search for
|
|
|
|
approximate patterns as well as block oriented search.
|
|
|
|
|
2014-04-24 10:34:32 +02:00
|
|
|
%package -n python-%{name}
|
|
|
|
Summary: Python bindings for the tre library
|
|
|
|
Group: System/Libraries
|
2010-01-07 13:03:51 +01:00
|
|
|
|
2014-04-24 10:34:32 +02:00
|
|
|
%description -n python-%{name}
|
|
|
|
This package contains the python bindings for the TRE library.
|
2010-01-07 13:03:51 +01:00
|
|
|
|
2014-04-24 11:10:59 +02:00
|
|
|
%lang_package
|
|
|
|
|
|
|
|
|
2010-01-07 13:03:51 +01:00
|
|
|
%prep
|
2012-02-08 17:21:03 +01:00
|
|
|
%setup -q
|
2010-01-07 13:03:51 +01:00
|
|
|
%patch0 -p1
|
2014-04-24 10:34:32 +02:00
|
|
|
%patch1 -p1 -b .chicken
|
2018-01-18 10:50:39 +01:00
|
|
|
%patch2 -p1
|
2014-04-24 10:34:32 +02:00
|
|
|
./utils/autogen.sh
|
2010-01-07 13:03:51 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%configure --disable-static --enable-shared
|
2012-02-08 17:21:03 +01:00
|
|
|
make %{?_smp_mflags}
|
2014-04-24 10:34:32 +02:00
|
|
|
pushd python
|
|
|
|
python setup.py build
|
|
|
|
popd
|
2010-01-07 13:03:51 +01:00
|
|
|
|
|
|
|
%install
|
2014-04-24 10:34:32 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
|
|
pushd python
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
popd
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2014-04-24 11:10:59 +02:00
|
|
|
%find_lang %{name} || echo -n >> %{name}.lang
|
2010-01-07 13:03:51 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr (-, root, root)
|
|
|
|
%doc ABOUT-NLS AUTHORS LICENSE NEWS README THANKS TODO
|
|
|
|
|
|
|
|
%files -n libtre5
|
|
|
|
%defattr (-, root, root)
|
|
|
|
%{_libdir}/libtre.so.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr (-, root, root)
|
|
|
|
%doc doc/default.css doc/tre-api.html doc/tre-syntax.html
|
|
|
|
%{_includedir}/*
|
|
|
|
%{_libdir}/libtre.so
|
|
|
|
%{_libdir}/pkgconfig/*
|
|
|
|
|
|
|
|
%files -n agrep
|
|
|
|
%defattr (-, root, root)
|
|
|
|
%{_bindir}/agrep
|
|
|
|
%{_mandir}/man1/agrep.1.gz
|
|
|
|
|
2014-04-24 10:34:32 +02:00
|
|
|
%files -n python-%{name}
|
|
|
|
%defattr (-, root, root)
|
|
|
|
%{python_sitearch}/tre.so
|
|
|
|
%{python_sitearch}/*.egg-info
|
|
|
|
|
2014-04-24 11:10:59 +02:00
|
|
|
%files lang -f %{name}.lang
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
2014-04-24 10:34:32 +02:00
|
|
|
%check
|
|
|
|
make check %{?_smp_mflags}
|
|
|
|
|
2010-01-07 13:03:51 +01:00
|
|
|
%changelog
|