diff --git a/tre-0.8.0.tar.bz2 b/tre-0.8.0.tar.bz2 deleted file mode 100644 index 9adc6d6..0000000 --- a/tre-0.8.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8dc642c2cde02b2dac6802cdbe2cda201daf79c4ebcbb3ea133915edf1636658 -size 380714 diff --git a/tre-0.8.0_git201402282055.tar.bz2 b/tre-0.8.0_git201402282055.tar.bz2 new file mode 100644 index 0000000..47dd10f --- /dev/null +++ b/tre-0.8.0_git201402282055.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e38db2657eb5570e34850741cee61cae6a083741954251526278a3e2b5cf3c0e +size 122103 diff --git a/tre-chicken.patch b/tre-chicken.patch new file mode 100644 index 0000000..c88f58b --- /dev/null +++ b/tre-chicken.patch @@ -0,0 +1,21 @@ +diff -up tre-0.8.0/python/setup.py.in.chicken tre-0.8.0/python/setup.py.in +--- tre-0.8.0/python/setup.py.in.chicken 2009-09-20 09:51:01.000000000 +0200 ++++ tre-0.8.0/python/setup.py.in 2009-09-20 15:43:45.000000000 +0200 +@@ -10,7 +10,8 @@ import shutil + + version = "@TRE_VERSION@" + data_files = [] +-include_dirs = ["../lib"] ++include_dirs = ["../include"] ++library_dirs = ["../lib/.libs"] + libraries = ["tre"] + + if sys.platform == "win32": +@@ -31,6 +32,7 @@ setup(name = "tre", + sources = ["tre-python.c"], + define_macros = [("HAVE_CONFIG_H", None)], + include_dirs = include_dirs, ++ library_dirs = library_dirs, + libraries = libraries + ), + ], diff --git a/tre.changes b/tre.changes index f257dd2..bc45a26 100644 --- a/tre.changes +++ b/tre.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Apr 24 09:06:44 UTC 2014 - pgajdos@suse.com + +- remove redundant setting of C(XX)FLAGS +- package translations in tre-lang + +------------------------------------------------------------------- +Tue Apr 8 10:01:26 CDT 2014 - bjones@ece.msstate.edu + +- Added make check tests +- Added python-tre wrapper +- Used updated source from https://github.com/laurikari/tre/ +- Added chicken.patch to correct Python build failures + ------------------------------------------------------------------- Tue May 8 12:47:43 UTC 2012 - cfarrell@suse.com diff --git a/tre.spec b/tre.spec index 6b816de..e56d41c 100644 --- a/tre.spec +++ b/tre.spec @@ -1,7 +1,7 @@ # # spec file for package tre # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,16 +17,26 @@ Name: tre -Version: 0.8.0 +Version: 0.8.0_git201402282055 Release: 0 -Source0: http://laurikari.net/tre/tre-%{version}.tar.bz2 -Patch0: %{name}.diff Summary: POSIX compatible regexp library with approximate matching License: BSD-3-Clause Group: System/Libraries Url: http://laurikari.net/tre/ -BuildRoot: %{_tmppath}/%{name}-%{version}-build +# 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 +# Update the python build to fix wrong include and lib paths. +# See https://github.com/laurikari/tre/pull/19. +Patch1: %{name}-chicken.patch +BuildRequires: gettext-devel +BuildRequires: libtool BuildRequires: pkgconfig +BuildRequires: python-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description TRE is a lightweight, robust, and efficient POSIX compatible regexp @@ -39,21 +49,21 @@ Group: System/Libraries Requires: %{name} = %{version} Obsoletes: libtre Provides: libtre +Recommends: %{name}-lang = %{version} %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 -Requires: libtre5 = %{version} Summary: POSIX compatible regexp library with approximate matching Group: Development/Libraries/C and C++ +Requires: libtre5 = %{version} Obsoletes: libtre-devel Provides: libtre-devel @@ -70,27 +80,36 @@ Group: Productivity/Text/Utilities agrep is another powerful grep which has the ability to search for approximate patterns as well as block oriented search. +%package -n python-%{name} +Summary: Python bindings for the tre library +Group: System/Libraries + +%description -n python-%{name} +This package contains the python bindings for the TRE library. + +%lang_package -Authors: --------- - Sun Wu - Udi Manber - Burra Gopal %prep %setup -q %patch0 -p1 +%patch1 -p1 -b .chicken +./utils/autogen.sh %build -export CXXFLAGS="$RPM_OPT_FLAGS" -export CFLAGS="$RPM_OPT_FLAGS" %configure --disable-static --enable-shared make %{?_smp_mflags} +pushd python +python setup.py build +popd %install -make install DESTDIR=$RPM_BUILD_ROOT -rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -rm -rf $RPM_BUILD_ROOT/usr/share/locale/ +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 +%find_lang %{name} || echo -n >> %{name}.lang %files %defattr (-, root, root) @@ -112,4 +131,15 @@ rm -rf $RPM_BUILD_ROOT/usr/share/locale/ %{_bindir}/agrep %{_mandir}/man1/agrep.1.gz +%files -n python-%{name} +%defattr (-, root, root) +%{python_sitearch}/tre.so +%{python_sitearch}/*.egg-info + +%files lang -f %{name}.lang +%defattr(-,root,root,-) + +%check +make check %{?_smp_mflags} + %changelog