Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > 94f695637c841d15dbbb3da3319f7a3d > files > 2

libstemmer-0-6mdv2009.1.src.rpm

%define	major 0
%define libname %mklibname stemmer %{major}
%define develname %mklibname stemmer -d

Summary:	The C version of the libstemmer library
Name:		libstemmer
Version:	0
Release:	%mkrel 6
Group:		System/Libraries
License:	BSD
URL:		http://snowball.tartarus.org/
Source0:	http://snowball.tartarus.org/dist/libstemmer_c.tgz
Patch0:		libstemmer-libtool.diff
BuildRequires:	libtool
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
Snowball is a small string processing language designed for
creating stemming algorithms for use in Information Retrieval.
This site describes Snowball, and presents several useful stemmers
which have been implemented using it.

This package containst the C version of the libstemmer library.

%package -n	%{libname}
Summary:	The C version of the libstemmer library
Group:          System/Libraries

%description -n	%{libname}
Snowball is a small string processing language designed for
creating stemming algorithms for use in Information Retrieval.
This site describes Snowball, and presents several useful stemmers
which have been implemented using it.

This package containst the C version of the libstemmer library.

%package -n	%{develname}
Summary:	Static library and header files for the libstemmer library
Group:		Development/C
Provides:	%{name}-devel = %{version}-%{release}
Requires:	%{libname} = %{version}
Obsoletes:	%{mklibname stemmer 0 -d}

%description -n	%{develname}
Snowball is a small string processing language designed for
creating stemming algorithms for use in Information Retrieval.
This site describes Snowball, and presents several useful stemmers
which have been implemented using it.

This package contains the static libstemmer library and its header
files.

%package -n	stemwords
Summary:	The stemwords utility using the libstemmer library
Group:          System/Libraries

%description -n	stemwords
The stemwords utility using the libstemmer library

%prep

%setup -q -n libstemmer_c
%patch0 -p0

# lib64 fix
perl -pi -e "s|/usr/lib|%{_libdir}|g" Makefile

%build

# voodoo magic
LDFLAGS=`rpm --eval %%configure|grep LDFLAGS|cut -d\" -f2`
perl -pi -e "s|^LDFLAGS.*|LDFLAGS = $LDFLAGS|g" Makefile

%make CFLAGS="%{optflags} -Wall -Iinclude -fPIC -DPIC -D_REENTRANT"

%install
rm -rf %{buildroot}

%makeinstall_std

# install referenced headers
install -m0644 src_c/stem_*.h %{buildroot}%{_includedir}/%{name}/

# fix location
perl -pi -e "s|\.\./src_c/||g" %{buildroot}%{_includedir}/%{name}/modules.h

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%clean
rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%doc README
%{_libdir}/*.so.*

%files -n %{develname}
%defattr(-,root,root)
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la

%files -n stemwords
%defattr(-,root,root)
%{_bindir}/stemwords


%changelog
* Thu Dec 18 2008 Oden Eriksson <oeriksson@mandriva.com> 0-6mdv2009.1
+ Revision: 315606
- use LDFLAGS from the %%configure macro

* Tue Jul 15 2008 Oden Eriksson <oeriksson@mandriva.com> 0-5mdv2009.0
+ Revision: 235927
- pass -Wl,--as-needed -Wl,--no-undefined to LDFLAGS

* Tue Jun 10 2008 Oden Eriksson <oeriksson@mandriva.com> 0-4mdv2009.0
+ Revision: 217701
- new unknown version
- rediffed the libtool patch
- install more headers

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Fri Feb 01 2008 Oden Eriksson <oeriksson@mandriva.com> 0-3mdv2008.1
+ Revision: 161224
- rebuild

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Sun Sep 09 2007 Oden Eriksson <oeriksson@mandriva.com> 0-2mdv2008.0
+ Revision: 83629
- new devel naming


* Sat Dec 09 2006 Oden Eriksson <oeriksson@mandriva.com> 0-1mdv2007.0
+ Revision: 94243
- Import libstemmer

* Sun Feb 05 2006 Oden Eriksson <oeriksson@mandriva.com> 0-1mdk
- initial Mandriva package