Blame SPECS/libstemmer.spec

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