Blame SPECS/libstemmer.spec

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