New upstream release.
Provide only python3-libvoikko, remove python2-libvoikko Use malaga for now, foma is not packaged for Fedora yet.
This commit is contained in:
parent
aeb554e108
commit
3c88a56628
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ libvoikko-3.0.tar.gz
|
||||
/libvoikko-3.7.tar.gz
|
||||
/libvoikko-3.7.1.tar.gz
|
||||
/libvoikko-3.8.tar.gz
|
||||
/libvoikko-4.1.1.tar.gz
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
%if 0%{?fedora}
|
||||
%global with_python2 1
|
||||
%endif
|
||||
|
||||
Name: libvoikko
|
||||
Version: 3.8
|
||||
Release: 11%{?dist}
|
||||
Version: 4.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Voikko is a library for spellcheckers and hyphenators
|
||||
|
||||
Group: System Environment/Libraries
|
||||
@ -17,9 +13,6 @@ Source0: http://www.puimula.org/voikko-sources/%{name}/%{name}-%{version}
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python3-devel
|
||||
%if 0%{?with_python2}
|
||||
BuildRequires: python2-devel
|
||||
%endif
|
||||
# Require the Finnish morphology because Finnish is currently the only language
|
||||
# supported by libvoikko in Fedora.
|
||||
Requires: malaga-suomi-voikko
|
||||
@ -56,20 +49,17 @@ This package contains voikkospell and voikkohyphenate, small command line
|
||||
tools for testing libvoikko. These tools may also be useful for shell
|
||||
scripts.
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%package -n python2-libvoikko
|
||||
%package -n python3-libvoikko
|
||||
Summary: Python interface to %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
# Note: noarch subpackage, only works in Fedora >= 11
|
||||
BuildArch: noarch
|
||||
%{?python_provide:%python_provide python2-libvoikko}
|
||||
%{?python_provide:%python_provide python3-libvoikko}
|
||||
|
||||
%description -n python2-libvoikko
|
||||
%description -n python3-libvoikko
|
||||
Python interface to libvoikko, library of Finnish language tools.
|
||||
This module can be used to perform various natural language analysis
|
||||
tasks on Finnish text.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
@ -77,12 +67,13 @@ tasks on Finnish text.
|
||||
|
||||
%build
|
||||
# The dictionary path must be the same where malaga-suomi-voikko is installed
|
||||
%configure --with-dictionary-path=%{_libdir}/voikko
|
||||
# Use malaga for now, no hfst or vfst. We need to package foma for the vfst dictionaries.
|
||||
%configure --with-dictionary-path=%{_libdir}/voikko --disable-hfst --disable-vfst --disable-buildtools --enable-malaga
|
||||
# Remove rpath,
|
||||
# https://fedoraproject.org/wiki/Packaging/Guidelines#Removing_Rpath
|
||||
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 %{?_smp_mflags} CXXFLAGS="$CXXFLAGS -Wno-deprecated"
|
||||
make %{?_smp_mflags} CXXFLAGS="$CXXFLAGS"
|
||||
|
||||
|
||||
%install
|
||||
@ -90,11 +81,9 @@ make install INSTALL="install -p" DESTDIR=$RPM_BUILD_ROOT
|
||||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||
# Remove static archive
|
||||
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
|
||||
%if 0%{?with_python2}
|
||||
# Install the Python interface
|
||||
install -d $RPM_BUILD_ROOT%{python_sitelib}
|
||||
install -pm 0644 python/libvoikko.py $RPM_BUILD_ROOT%{python_sitelib}/
|
||||
%endif
|
||||
install -d $RPM_BUILD_ROOT%{python3_sitelib}
|
||||
install -pm 0644 python/libvoikko.py $RPM_BUILD_ROOT%{python3_sitelib}/
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
@ -118,12 +107,16 @@ install -pm 0644 python/libvoikko.py $RPM_BUILD_ROOT%{python_sitelib}/
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/libvoikko.pc
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%files -n python2-libvoikko
|
||||
%{python2_sitelib}/%{name}.py*
|
||||
%endif
|
||||
%files -n python3-libvoikko
|
||||
%{python3_sitelib}/%{name}.py*
|
||||
%{python3_sitelib}/__pycache__/*
|
||||
|
||||
%changelog
|
||||
* Fri Aug 3 2018 Ville-Pekka Vainio <vpvainio AT iki.fi> - 4.1.1-1
|
||||
- New upstream release.
|
||||
- Provide only python3-libvoikko, remove python2-libvoikko
|
||||
- Use malaga for now, foma is not packaged for Fedora yet.
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.8-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user