libvoikko/libvoikko.spec
wk333 b88cf0ece5 Package upgrade
(cherry picked from commit 4f2f9c46e5c44559d598cff2a03a30ac098a1b05)
2022-10-19 14:17:01 +08:00

100 lines
2.8 KiB
RPMSpec

Name: libvoikko
Version: 4.3.1
Release: 1
Summary: Voikko is a library for spellcheckers and hyphenators
License: GPLv2+
URL: http://voikko.puimula.org
Source0: http://www.puimula.org/voikko-sources/%{name}/%{name}-%{version}.tar.gz
BuildRequires: gcc-c++ python3-devel
Provides: voikko-tools = %{version}-%{release}
Obsoletes: voikko-tools < %{version}-%{release}
%description
libvoikko is a spell checker and hyphenation library using Malaga's
natural language grammar development tools. Written in C.
Currently only Finnish is supported, but the library's API has been
designed to allow future support for other languages. Please note that
Malaga is a fairly low-level tool that requires the entire form of the
language to be implemented as left-associative grammar.Therefore languages that have
simple or even moderately complex morphologies and do not require morphological
analysis in their hyphenators should be implemented using other tools such as
Hunspell.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release} pkgconfig
%description devel
The libvoikko-devel package contains libraries and header files for
developing applications that use libvoikko.
%package -n python3-libvoikko
Summary: Python interface to %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%{?python_provide:%python_provide python3-libvoikko}
%description -n python3-libvoikko
libvoikko's Finnish language Python interface.
This module can be used to perform various natural language analysis
tasks on Finnish text.
%package help
Summary: Introduce how to use %{name}
%description help
User's Manual for %{name}
%prep
%autosetup -p1
%build
%configure --with-dictionary-path=%{_libdir}/voikko --disable-hfst --disable-vfst --disable-buildtools --enable-malaga
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build CXXFLAGS="$CXXFLAGS"
%install
%make_install
%delete_la_and_a
install -d $RPM_BUILD_ROOT%{python3_sitelib}
install -pm 0644 python/libvoikko.py $RPM_BUILD_ROOT%{python3_sitelib}/
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc COPYING README
%{_libdir}/*.so.*
%{_bindir}/*
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/libvoikko.pc
%files -n python3-libvoikko
%{python3_sitelib}/%{name}.py*
%{python3_sitelib}/__pycache__/*
%files help
%doc ChangeLog
%{_mandir}/man1/*.1.gz
%changelog
* Thu Jun 16 2022 SimpleUpdate Robot <tc@openeuler.org> - 4.3.1-1
- Upgrade to version 4.3.1
* Wed Jan 15 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.1.1-3
- Delete unneeded requires
* Thu Dec 12 2019 yangjian<yangjian79@huawei.com> - 4.1.1-2
- Package init