%define name sary
%define version	1.2.0
%define release	2%{?_dist_release}

Summary:	Suffix array library (with tools)
Name:		%{name}
Version:	%{version}
Release:	%{release}
Group:		System Environment/Libraries
License:	LGPL
URL:		http://prime.sourceforge.jp/src/
Source:		%{name}-%{version}.tar.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	glib2-devel


%description
Sary is a suffix array library. It provides fast full-text 
search facilities for text files on the order of 10 to 100 
MB using a data structure called a suffix array. It can also 
search specific fields in a text file by assigning index 
points to those fields. 


%package -n %{name}-devel
Summary:	Development headers for sary
Group:		Development/Libraries
Requires:	%{name} = %{version}
Requires:	glib2-devel
Provides:	%{name}-devel = %{version}-%{release}

%description -n %{name}-devel
Sary is a suffix array library. It provides fast full-text 
search facilities for text files on the order of 10 to 100 
MB using a data structure called a suffix array. It can also 
search specific fields in a text file by assigning index 
points to those fields.


%prep
%setup -q

%build
[[ ! -x configure ]] && ./autogen.sh

%configure --disable-static
%{__make} %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
%{__make} DESTDIR=$RPM_BUILD_ROOT install

rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog NEWS README TODO
%{_bindir}/mksary
%{_bindir}/sary
%{_datadir}/%name
%_mandir/man*/*
%{_libdir}/libsary.so.10.0.0
%{_libdir}/libsary.so.10

%files -n %{name}-devel
%defattr(-,root,root)
%{_includedir}/*
#{_libdir}/libsary.a
#{_libdir}/libsary.la
%{_libdir}/libsary.so
%{_libdir}/pkgconfig/sary.pc


%changelog
* Sat Apr 16 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.0-2
- rebuilt with current VineSeed
- removed static libraries from devel package

* Sat Nov 01 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.2.0-1
- initial build for VineSeed

* Mon Mar 24 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.2.0-1vl5
- initial build for VineSeed

### end of file
