Blame SPECS/libstemmer.spec

45c384
%{?scl:%scl_package libstemmer}
45c384
%{!?scl:%global pkg_name %{name}}
45c384
45c384
Name:		%{?scl_prefix}libstemmer
45c384
Version:	0
45c384
Release:	5.585svn%{?dist}
45c384
Summary:	C stemming algorithm library
45c384
# The site and project is no longer being actively maintained. 
45c384
# The code is available on Github - https://github.com/snowballstem/snowball
45c384
URL:		http://snowball.tartarus.org
45c384
# The licence is specified on website
45c384
# http://snowball.tartarus.org/license.php
45c384
# There is a pull request to include it into source code
45c384
# https://github.com/snowballstem/snowball/issues/10
45c384
License:	BSD
45c384
Source0:	http://snowball.tartarus.org/dist/%{pkg_name}_c-svn585.tgz
45c384
Source1:	Notice.txt
45c384
Source2:	BSD.txt
45c384
45c384
%{?scl:Requires:%scl_runtime}
45c384
45c384
%description
45c384
Snowball stemming algorithms for use in Information Retrieval Snowball 
45c384
provides access to efficient algorithms for calculating a "stemmed" 
45c384
form of a word.  This is a form with most of the common morphological 
45c384
endings removed; hopefully representing a common linguistic base form.  
45c384
This is most useful in building search engines and information 
45c384
retrieval software; for example, a search with stemming enabled should 
45c384
be able to find a document containing "cycling" given the query 
45c384
"cycles".
45c384
45c384
Snowball provides algorithms for several (mainly European) languages. 
45c384
It also provides access to the classic Porter stemming algorithm for 
45c384
English: although this has been superseded by an improved algorithm, 
45c384
the original algorithm may be of interest to information retrieval 
45c384
researchers wishing to reproduce results of earlier experiments.
45c384
45c384
%package devel
45c384
Summary:	C stemming algorithm library developer files
45c384
Requires:	%{name}%{?_isa} = %{version}-%{release}
45c384
45c384
%description devel
45c384
This package contains development files of libstemmer.
45c384
45c384
Snowball stemming algorithms for use in Information Retrieval Snowball 
45c384
provides access to efficient algorithms for calculating a "stemmed" 
45c384
form of a word.  This is a form with most of the common morphological 
45c384
endings removed; hopefully representing a common linguistic base form.  
45c384
This is most useful in building search engines and information 
45c384
retrieval software; for example, a search with stemming enabled should 
45c384
be able to find a document containing "cycling" given the query 
45c384
"cycles".
45c384
45c384
Snowball provides algorithms for several (mainly European) languages. 
45c384
It also provides access to the classic Porter stemming algorithm for 
45c384
English: although this has been superseded by an improved algorithm, 
45c384
the original algorithm may be of interest to information retrieval 
45c384
researchers wishing to reproduce results of earlier experiments.
45c384
45c384
%prep
45c384
%setup -q -n libstemmer_c
45c384
45c384
# Add rule to make libstemmer.so
45c384
sed -i -r "s|(^libstemmer.o:)|libstemmer.so: \$\(snowball_sources:.c=.o\)\n\
45c384
\t\$\(CC\) \$\(CFLAGS\) -shared \$\(LDFLAGS\) -Wl,-soname,libstemmer.so.%{?scl_prefix}0 \
45c384
-o \$\@.%{?scl_prefix}0.0.0 \$\^\n\1|" Makefile
45c384
45c384
%build
45c384
make libstemmer.so %{?_smp_mflags} CFLAGS="%{optflags} -fPIC -Iinclude"
45c384
45c384
%install
45c384
mkdir -p %{buildroot}%{_libdir}
45c384
mkdir -p %{buildroot}%{_includedir}
45c384
install -p -D -m 755	libstemmer.so.%{?scl_prefix}0.0.0	%{buildroot}%{_libdir}/
45c384
ln -s libstemmer.so.%{?scl_prefix}0.0.0	%{buildroot}%{_libdir}/libstemmer.so.%{?scl_prefix}0
45c384
ln -s libstemmer.so.%{?scl_prefix}0.0.0	%{buildroot}%{_libdir}/libstemmer.so
45c384
install -p -D -m 644	include/*	%{buildroot}%{_includedir}/
45c384
45c384
cp %{SOURCE1} %{SOURCE2} .
45c384
45c384
%post -p /sbin/ldconfig
45c384
45c384
%postun -p /sbin/ldconfig
45c384
45c384
%files
45c384
%doc Notice.txt BSD.txt README
45c384
%{_libdir}/libstemmer.so.*
45c384
45c384
%files devel
45c384
%{_libdir}/libstemmer.so
45c384
%{_includedir}/*
45c384
45c384
%changelog
45c384
* Wed Mar 18 2015 Marek Skalicky <mskalick@redhat.com> - 0-5.585svn
45c384
- Rebuilt for 'scls' removal
45c384
45c384
* Mon Jan 26 2015 Marek Skalicky <mskalick@redhat.com> - 0-4.585svn
45c384
- Added scl_runtime requires
45c384
45c384
* Sun Jan 18 2015 Honza Horak <hhorak@redhat.com> - 0-3.585svn
45c384
- Convert to scl package
45c384
45c384
* Tue Jan 6 2015 Marek Skalicky <mskalick@redhat.com> - 0-2.585svn
45c384
- Removed undefined-non-weak-symbol warnings
45c384
45c384
* Tue Dec 2 2014 Marek Skalicky <mskalick@redhat.com> - 0-1.585svn
45c384
- Initial packaging