File libstemmer.spec of Package libstemmer

Name: libstemmer
Version: 0
Release: 1
Summary: C stemming algorithm library
Group: System/Libraries
# The site and project is no longer being actively maintained. 
# The code is available on Github - https://github.com/snowballstem/snowball
URL: http://snowball.tartarus.org
License: BSD-3-Clause
Source: http://snowball.tartarus.org/dist/%{name}_c.tgz
Source9: %name-rpmlintrc
Provides: %{name}0 = %version-%release

%description
Snowball stemming algorithms for use in Information Retrieval Snowball provides
access to efficient algorithms for calculating a "stemmed" form of a word. This
is a form with most of the common morphological endings removed; hopefully
representing a common linguistic base form. This is most useful in building
search engines and information retrieval software; for example, a search with
stemming enabled should be able to find a document containing "cycling" given the
query "cycles".
Snowball provides algorithms for several (mainly European) languages. It also
provides access to the classic Porter stemming algorithm for English: although
this has been superseded by an improved algorithm, the original algorithm may be
of interest to information retrieval researchers wishing to reproduce results of
earlier experiments.


%package devel
Summary: C stemming algorithm library developer files
Group: Development/Languages/C and C++
Requires: %name = %version-%release

%description devel
Snowball stemming algorithms for use in Information Retrieval Snowball provides
access to efficient algorithms for calculating a "stemmed" form of a word. This
is a form with most of the common morphological endings removed; hopefully
representing a common linguistic base form. This is most useful in building
search engines and information retrieval software; for example, a search with
stemming enabled should be able to find a document containing "cycling" given the
query "cycles".
Snowball provides algorithms for several (mainly European) languages. It also
provides access to the classic Porter stemming algorithm for English: although
this has been superseded by an improved algorithm, the original algorithm may be
of interest to information retrieval researchers wishing to reproduce results of
earlier experiments.
This package contains development files of %name.


%prep
%setup -q -n %{name}_c
# Add rule to make libstemmer.so
cat >> Makefile <<"__EOF__"
%name.so: $(snowball_sources:.c=.o)
	$(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,%name.so.0 -o $@.0.0.0 $^
__EOF__


%build
make %{?_smp_mflags} %{?__cc:CC="%__cc"} CFLAGS="%optflags -fPIC -Iinclude" %name.so


%install
install -pD -m 0755 %name.so.0.0.0 %buildroot%_libdir/%name.so.0.0.0
for i in so.0 so; do
	ln -s %name.so.0.0.0  %buildroot%_libdir/%name.$i
done
install -d -m 0755 %buildroot%_includedir
install -p -m 0644 include/* %buildroot%_includedir/


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


%files
%defattr(-,root,root)
%doc README
%_libdir/*.so.*


%files devel
%defattr(-,root,root)
%_libdir/*.so
%_includedir/*


%changelog
openSUSE Build Service is sponsored by