!1 add package

Merge pull request !1 from lkx690/master
This commit is contained in:
openeuler-ci-bot 2019-12-17 11:10:56 +08:00 committed by Gitee
commit a0999cb520
4 changed files with 95 additions and 0 deletions

11
BSD.txt Normal file
View File

@ -0,0 +1,11 @@
Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
Copyright (c) 2002, Richard Boulton
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

9
Notice.txt Normal file
View File

@ -0,0 +1,9 @@
All the software given out on this Snowball site is covered by the BSD License (see http://www.opensource.org/licenses/bsd-license.html ), with Copyright (c) 2001, Dr Martin Porter, and (for the Java developments) Copyright (c) 2002, Richard Boulton.
Essentially, all this means is that you can do what you like with the code, except claim another Copyright for it, or claim that it is issued under a different license. The software is also issued without warranties, which means that if anyone suffers through its use, they cannot come back and sue you. You also have to alert anyone to whom you give the Snowball software to the fact that it is covered by the BSD license.
We have not bothered to insert the licensing arrangement into the text of the Snowball software.
(from: http://snowball.tartarus.org/license.php)

75
libstemmer.spec Normal file
View File

@ -0,0 +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

BIN
libstemmer_c.tgz Normal file

Binary file not shown.