modify spec file
This commit is contained in:
parent
e77c3951d7
commit
ef36060e70
@ -1 +1,75 @@
|
||||
Name: libstemmer
|
||||
Version: 0
|
||||
Release: 12
|
||||
Summary: C stemming algorithm library
|
||||
URL: https://snowballstem.org/
|
||||
License: BSD
|
||||
Source0: http://snowball.tartarus.org/dist/%{name}_c.tgz
|
||||
Source1: Notice.txt
|
||||
Source2: BSD.txt
|
||||
|
||||
BuildRequires: gcc
|
||||
|
||||
%global _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.
|
||||
|
||||
%description
|
||||
%{_description}
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: C stemming algorithm library developer files
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
This package contains development files of libstemmer.
|
||||
|
||||
%{_description}
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}_c
|
||||
|
||||
sed -i -r "s|(^%{name}.o:)|%{name}.so: \$\(snowball_sources:.c=.o\)\n\
|
||||
\t\$\(CC\) \$\(CFLAGS\) -shared \$\(LDFLAGS\) -Wl,-soname,%{name}.so.0 \
|
||||
-o \$\@.0.0.0 \$\^\n\1|" Makefile
|
||||
|
||||
%build
|
||||
%make_build CFLAGS="%{optflags} -fPIC -Iinclude" LDFLAGS="$RPM_LD_FLAGS" %{name}.so
|
||||
|
||||
%install
|
||||
install -pDm 755 %{name}.so.0.0.0 %{buildroot}%{_libdir}/%{name}.so.0.0.0
|
||||
ln -s %{name}.so.0.0.0 %{buildroot}%{_libdir}/%{name}.so.0
|
||||
ln -s %{name}.so.0.0.0 %{buildroot}%{_libdir}/%{name}.so
|
||||
install -d -m 755 %{buildroot}%{_includedir}
|
||||
install -pDm 644 include/* %{buildroot}%{_includedir}/
|
||||
|
||||
cp %{SOURCE1} %{SOURCE2} .
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%license Notice.txt BSD.txt
|
||||
%doc README
|
||||
%{_libdir}/%{name}.so.*
|
||||
|
||||
%files devel
|
||||
%{_libdir}/%{name}.so
|
||||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
* Tue Dec 3 2019 mengxian <mengxian@huawei.com> - 0-12
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user