diff --git a/libvoikko.spec b/libvoikko.spec index ca624d3..4953e2a 100644 --- a/libvoikko.spec +++ b/libvoikko.spec @@ -1,6 +1,10 @@ +%if 0%{?fedora} +%global with_python2 1 +%endif + Name: libvoikko Version: 3.8 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Voikko is a library for spellcheckers and hyphenators Group: System Environment/Libraries @@ -11,7 +15,9 @@ Source0: http://www.puimula.org/voikko-sources/%{name}/%{name}-%{version} # The usual format of test release URLs #Source0: http://www.puimula.org/htp/testing/%%{name}-%%{version}rc1.tar.gz +%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 @@ -48,6 +54,7 @@ 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 Summary: Python interface to %{name} Group: Development/Libraries @@ -60,7 +67,7 @@ BuildArch: noarch 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 @@ -81,10 +88,11 @@ 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 %post -p /sbin/ldconfig @@ -108,10 +116,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 %{python_sitelib}/%{name}.py* +%endif %changelog +* Thu Apr 19 2018 Mike FABIAN - 3.8-8 +- Build Python 2 subpackage only for Fedora +- Resolves: rhbz#1566121 + * Wed Feb 07 2018 Fedora Release Engineering - 3.8-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild