File tre.spec of Package tre

#
# spec file for package tre (Version 0.8.0)
#
# Copyright (c) 2010 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
# 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
Version:        0.8.0
Release:        1
License:        LGPLv2.1+
Group:          System/Libraries
Source0:        http://laurikari.net/tre/tre-%{version}.tar.bz2
Patch0:         %{name}.diff
Summary:        POSIX compatible regexp library with approximate matching
Url:            http://laurikari.net/tre/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
TRE is a lightweight, robust, and efficient POSIX compatible regexp
matching library with some exciting features such as approximate
matching.



Authors:
--------
    Ville Laurikari <vl@iki.fi>

%package -n libtre5
License:        GPL v2.1 or later
Summary:        POSIX compatible regexp library with approximate matching
Group:          System/Libraries
Requires:       %{name} = %{version}
Obsoletes:      libtre
Provides:       libtre

%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
License:        LGPLv2.1+
Requires:       libtre5 = %{version}
Summary:        POSIX compatible regexp library with approximate matching
Group:          Development/Libraries/C and C++
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.



Authors:
--------
    Ville Laurikari <vl@iki.fi>

%package -n agrep
License:        NON-OSI-COMPLIANT(non-commercial) ; LGPLv2.1+
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.



Authors:
--------
    Sun Wu
    Udi Manber
    Burra Gopal

%prep
%setup -q -n tre-%{version}
%patch0 -p1

%build
export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$RPM_OPT_FLAGS"
%configure --disable-static --enable-shared
make %{?jobs:-j%jobs}

%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT/usr/share/locale/

%clean
rm -rf $RPM_BUILD_ROOT

%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

%changelog