b29e68
Name:           libvoikko
b29e68
Version:        4.1.1
b931b5
Release:        3%{?dist}
b29e68
Summary:        Voikko is a library for spellcheckers and hyphenators
b29e68
b29e68
Group:          System Environment/Libraries
b29e68
License:        GPLv2+
b29e68
URL:            http://voikko.puimula.org
b29e68
# The usual format of stable release URLs
b29e68
Source0:        http://www.puimula.org/voikko-sources/%{name}/%{name}-%{version}.tar.gz
b29e68
# The usual format of test release URLs
b29e68
#Source0:        http://www.puimula.org/htp/testing/%%{name}-%%{version}rc1.tar.gz
b29e68
b29e68
BuildRequires:  gcc-c++
b29e68
BuildRequires:  python3-devel
b29e68
# Require the Finnish morphology because Finnish is currently the only language
b29e68
# supported by libvoikko in Fedora.
b29e68
Requires:       malaga-suomi-voikko
b29e68
b29e68
%description
b29e68
This is libvoikko, library for spellcheckers and hyphenators using Malaga
b29e68
natural language grammar development tool. The library is written in C.
b29e68
b29e68
Currently only Finnish is supported, but the API of the library has been
b29e68
designed to allow adding support for other languages later. Note however that
b29e68
Malaga is rather low level tool that requires implementing the whole morphology
b29e68
of a language as a left associative grammar. Therefore languages that have
b29e68
simple or even moderately complex morphologies and do not require morphological
b29e68
analysis in their hyphenators should be implemented using other tools such as
b29e68
Hunspell.
b29e68
b29e68
%package        devel
b29e68
Summary:        Development files for %{name}
b29e68
Group:          Development/Libraries
b29e68
Requires:       %{name}%{?_isa} = %{version}-%{release}
b29e68
Requires:       pkgconfig
b29e68
b29e68
%description    devel
b29e68
The %{name}-devel package contains libraries and header files for
b29e68
developing applications that use %{name}.
b29e68
b29e68
%package -n     voikko-tools
b29e68
Summary:        Test tools for %{name}
b29e68
Group:          Applications/Text
b29e68
Requires:       %{name}%{?_isa} = %{version}-%{release}
b29e68
b29e68
%description -n voikko-tools
b29e68
This package contains voikkospell and voikkohyphenate, small command line
b29e68
tools for testing libvoikko. These tools may also be useful for shell
b29e68
scripts.
b29e68
b29e68
%package -n python3-libvoikko
b29e68
Summary:        Python interface to %{name}
b29e68
Group:          Development/Libraries
b29e68
Requires:       %{name} = %{version}-%{release}
b29e68
BuildArch:      noarch
b29e68
%{?python_provide:%python_provide python3-libvoikko}
b29e68
b29e68
%description -n python3-libvoikko
b29e68
Python interface to libvoikko, library of Finnish language tools.
b29e68
This module can be used to perform various natural language analysis
b29e68
tasks on Finnish text.
b29e68
b29e68
%prep
b29e68
%setup -q
b29e68
b29e68
b29e68
%build
b29e68
# The dictionary path must be the same where malaga-suomi-voikko is installed
b29e68
# Use malaga for now, no hfst or vfst. We need to package foma for the vfst dictionaries.
b29e68
%configure --with-dictionary-path=%{_libdir}/voikko --disable-hfst --disable-vfst --disable-buildtools --enable-malaga
b29e68
# Remove rpath,
b29e68
# https://fedoraproject.org/wiki/Packaging/Guidelines#Removing_Rpath
b29e68
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
b29e68
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
b29e68
make %{?_smp_mflags} CXXFLAGS="$CXXFLAGS"
b29e68
b29e68
b29e68
%install
b29e68
make install INSTALL="install -p" DESTDIR=$RPM_BUILD_ROOT
b29e68
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
b29e68
# Remove static archive
b29e68
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
b29e68
# Install the Python interface
b29e68
install -d $RPM_BUILD_ROOT%{python3_sitelib}
b29e68
install -pm 0644 python/libvoikko.py $RPM_BUILD_ROOT%{python3_sitelib}/
b29e68
b29e68
%post -p /sbin/ldconfig
b29e68
b29e68
%postun -p /sbin/ldconfig
b29e68
b29e68
b29e68
%files
b29e68
%doc ChangeLog COPYING README
b29e68
%{_libdir}/*.so.*
b29e68
b29e68
%files -n voikko-tools
b29e68
%{_bindir}/voikkospell
b29e68
%{_bindir}/voikkohyphenate
b29e68
%{_bindir}/voikkogc
6f9da4
%{_mandir}/man1/voikkohyphenate.1*
6f9da4
%{_mandir}/man1/voikkospell.1*
6f9da4
%{_mandir}/man1/voikkogc.1*
b29e68
b29e68
%files devel
b29e68
%{_includedir}/*
b29e68
%{_libdir}/*.so
b29e68
%{_libdir}/pkgconfig/libvoikko.pc
b29e68
b29e68
%files -n python3-libvoikko
b29e68
%{python3_sitelib}/%{name}.py*
6f9da4
%if ! 0%{?flatpak}
b29e68
%{python3_sitelib}/__pycache__/*
6f9da4
%endif
b29e68
b29e68
%changelog
b931b5
* Wed Jun 30 2021 Mike FABIAN <mfabian@redhat.com> - 4.1.1-3
b931b5
- Resolves: rhbz#1975295 Bump release number
b931b5
6f9da4
* Thu Nov 26 2020 Mike FABIAN <mfabian@redhat.com> - 4.1.1-2
6f9da4
- Fix man file names for Flatpak builds, exclude __pycache__ files from Flatpak builds
6f9da4
- Resolves: rhbz#1896322
6f9da4
b29e68
* Thu Oct 04 2018 Mike FABIAN <mfabian@redhat.com> - 4.1.1-1
b29e68
- Rebase to 4.1.1 from Fedora 29 (provides only python3-libvoikko,
b29e68
  removes python2-libvoikko)
b29e68
- Resolves: rhbz#1636062
b29e68
b29e68
* Wed May 23 2018 Mike FABIAN <mfabian@redhat.com> - 3.8-9
b29e68
- Add python3-devel to BuildRequires.
b29e68
- Resolves: rhbz#1580782
b29e68
b29e68
* Thu Apr 19 2018 Mike FABIAN <mfabian@redhat.com> - 3.8-8
b29e68
- Build Python 2 subpackage only for Fedora
b29e68
- Resolves: rhbz#1566121
b29e68
b29e68
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.8-7
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b29e68
b29e68
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.8-6
b29e68
- Python 2 binary package renamed to python2-libvoikko
b29e68
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
b29e68
b29e68
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.8-5
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b29e68
b29e68
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.8-4
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b29e68
b29e68
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.8-3
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b29e68
b29e68
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-2
b29e68
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
b29e68
b29e68
* Thu Jul 14 2016 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.8-1
b29e68
- New upstream release
b29e68
b29e68
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-4
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b29e68
b29e68
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.1-3
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b29e68
b29e68
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.7.1-2
b29e68
- Rebuilt for GCC 5 C++11 ABI change
b29e68
b29e68
* Sat Oct 25 2014 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.7.1-1
b29e68
- New upstream release
b29e68
b29e68
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-3
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b29e68
b29e68
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-2
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b29e68
b29e68
* Sun Jan 26 2014 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.7-1
b29e68
- New upstream release
b29e68
b29e68
* Fri Oct 18 2013 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.6.1-1
b29e68
- New upstream release
b29e68
- Remove voikkovfstc from the package, it is not built by default anymore
b29e68
- Update upstream URLs
b29e68
b29e68
* Mon Jul 29 2013 Parag <paragn AT fedoraproject DOT org> - 3.6-2
b29e68
- Ah don't add %%{?_isa} for noarch packages
b29e68
b29e68
* Mon Jul 29 2013 Parag <paragn AT fedoraproject DOT org> - 3.6-2
b29e68
- Fix spec file to follow packaging guidelines
b29e68
b29e68
* Sun Apr 14 2013 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.6-1
b29e68
- New upstream release
b29e68
b29e68
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5-3
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b29e68
b29e68
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5-2
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b29e68
b29e68
* Sun Jul 01 2012 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.5-1
b29e68
- New upstream release
b29e68
b29e68
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.1-2
b29e68
- Rebuilt for c++ ABI breakage
b29e68
b29e68
* Sat Feb 04 2012 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.4.1-1
b29e68
- New upstream release, fixes build with GCC 4.7
b29e68
b29e68
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-2
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b29e68
b29e68
* Tue Dec 27 2011 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.4-1
b29e68
- Update to the latest upstream release:
b29e68
- A crash bug affecting grammar checker has been fixed.
b29e68
- New grammar checker rule for missing verbs has been added.
b29e68
b29e68
* Sun Sep 25 2011 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.3.1-0.3.rc1
b29e68
- Remove the isa macro from the malaga-suomi-voikko dependency,
b29e68
  malaga-suomi-voikko is not a library and is thus not multilib'd. The previous
b29e68
  change was a misunderstanding.
b29e68
b29e68
* Sat Sep 24 2011 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.3.1-0.2.rc1
b29e68
- Add the isa macro to the malaga-suomi-voikko dependency and drop the version.
b29e68
b29e68
* Sat Sep 24 2011 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.3.1-0.1.rc1
b29e68
- New upstream release candidate, fixes a bug which crashed Firefox when
b29e68
  using Finnish spell checking.
b29e68
b29e68
* Fri Sep 16 2011 Ville-Pekka Vainio <vpvainio AT iki.fi> - 3.3-1
b29e68
- New upstream release
b29e68
b29e68
* Sun Jun 12 2011 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.2.1-1
b29e68
- New upstream release
b29e68
- Fixes handling of embedded null characters in input strings entered through
b29e68
  Python or Java interfaces.
b29e68
b29e68
* Fri Mar 25 2011 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.2-1
b29e68
- New upstream release
b29e68
b29e68
* Tue Feb 15 2011 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.1-3
b29e68
- Add patch to fix build with GCC 4.6
b29e68
b29e68
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-2
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b29e68
b29e68
* Mon Nov 22 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.1-1
b29e68
- New upstream release
b29e68
- Remove the unneeded %%clean section, not needed in Fedora >= 13
b29e68
b29e68
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.0-2
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
b29e68
b29e68
* Thu May 27 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.0-1
b29e68
- 3.0 final
b29e68
b29e68
* Thu May 13 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.0-0.1.rc1
b29e68
- New upstream release candidate with multithread support
b29e68
- Remove unneeded BuildRoot tag
b29e68
b29e68
* Thu Feb 18 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.3.1-1
b29e68
- Version 2.3.1 contains fixes for bugs found in version 2.3
b29e68
b29e68
* Sun Jan 31 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.3-0.1.rc1
b29e68
- New release candidate
b29e68
- Dependency on glib has been removed
b29e68
b29e68
* Wed Nov 11 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2.2-1
b29e68
- Version 2.2.2 fixes a crash found in version 2.2.1 that can occur when the
b29e68
  APIs that use wchar_t strings as arguments are used.
b29e68
b29e68
* Mon Oct 26 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2.1-2
b29e68
- Add Python interface (package python-libvoikko, noarch)
b29e68
b29e68
* Fri Oct 09 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2.1-1
b29e68
- New upstream release, fixes bugs found in 2.2
b29e68
b29e68
* Fri Sep 18 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2-0.3.rc2
b29e68
- 2.2rc2
b29e68
- Remove getcwd() value check patch, accepted upstream
b29e68
b29e68
* Wed Sep 16 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2-0.2.rc1
b29e68
- Remove rpath which was set for the voikko-tools binaries in 64 bit
b29e68
  architechtures
b29e68
b29e68
* Tue Sep 15 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2-0.1.rc1
b29e68
- New release candidate
b29e68
- Improvements to spelling suggestions, grammar checker etc.
b29e68
- Libvoikko now uses its own internal implementation of malaga.
b29e68
- This prevents symbol conflicts such as https://bugzilla.redhat.com/502546
b29e68
- BuildRequires malaga removed and glib2-devel added.
b29e68
- Require malaga-suomi-voikko >= 1.4, libvoikko 2.2 expects the newer
b29e68
  dictionary format
b29e68
- Add a patch to make it compile on Fedora with -Werror
b29e68
b29e68
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b29e68
b29e68
* Sat May 2 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-1
b29e68
- 2.1 final, including fixes to grammar checking
b29e68
b29e68
* Fri Apr 17 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.5.rc4
b29e68
- 2.1rc4:
b29e68
  - Fix invalid use of delete vs. delete[]
b29e68
  - Limit the scope of some variables
b29e68
b29e68
* Mon Apr 13 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.4.rc3
b29e68
- 2.1rc3, remove patch
b29e68
b29e68
* Sat Apr 11 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.3.rc2
b29e68
- Patch to current SVN HEAD, includes a fix for a memory leak in the grammar
b29e68
  checker
b29e68
b29e68
* Mon Apr 6 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.2.rc2
b29e68
- New release candidate
b29e68
- Both patches applied upstream
b29e68
b29e68
* Mon Apr 6 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.1.rc1
b29e68
- New release candidate
b29e68
- Improvements on grammar checking and dictionary loading
b29e68
- Raise malaga-suomi-voikko dependency to 1.3-10, which has the new dictionary
b29e68
  data directory layout needed by this version of libvoikko
b29e68
- Add BuildRequires python for running the trie compiler during build
b29e68
- Add patch for GCC 4.4 and glibc 2.90 compliance
b29e68
- Add patch to fix warn_unused_result errors
b29e68
b29e68
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-2
b29e68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
b29e68
b29e68
* Thu Aug 28 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.0-1
b29e68
- libvoikko 2.0
b29e68
b29e68
* Sat Aug 23 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.0-0.1.rc1
b29e68
- New release candidate, including the new voikkogc tool in voikko-tools
b29e68
- Add defattr to voikko-tools
b29e68
- Drop upstreamed pkg-config patch
b29e68
b29e68
* Fri May 30 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 1.7-3
b29e68
- Add Requires pkgconfig to -devel
b29e68
b29e68
* Mon May 26 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 1.7-2
b29e68
- Add patch which makes a libvoikko.pc file for pkg-config
b29e68
b29e68
* Sat May 24 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 1.7-1
b29e68
- libvoikko 1.7
b29e68
b29e68
* Thu May 22 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.7-0.2.rc2
b29e68
- Don't BuildRequire the Finnish data files, this should make Koji builds a bit
b29e68
  quicker
b29e68
b29e68
* Sun May 11 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.7-0.1.rc2
b29e68
- New release candidate
b29e68
b29e68
* Sun Mar 02 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-3
b29e68
- Put voikkospell and voikkohyphenate into a separate voikko-tools
b29e68
  subpackage to decrease the size of the binary libvoikko package
b29e68
b29e68
* Sat Feb 16 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-2
b29e68
- Rebuild for GCC 4.3
b29e68
b29e68
* Tue Dec 04 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-1
b29e68
- libvoikko 1.6
b29e68
- Add versioned BuildRequires and Requires as per the Voikko release notes
b29e68
  at http://voikko.sourceforge.net/releases.html
b29e68
b29e68
* Mon Dec 03 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-0.4.rc4
b29e68
- Upstream released a new release candidate
b29e68
b29e68
* Wed Nov 28 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-0.3.rc3
b29e68
- Upstream released a new release candidate
b29e68
b29e68
* Wed Nov 28 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-0.2.rc2
b29e68
- Upstream released a new release candidate
b29e68
b29e68
* Tue Nov 27 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-0.1.rc1
b29e68
- Upstream released a new release candidate
b29e68
b29e68
* Thu Nov 08 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.5-1
b29e68
- Bump Release for the first Fedora build
b29e68
b29e68
* Wed Nov 07 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.5-0.3
b29e68
- libvoikko-devel: remove unneeded Requires: malaga-devel
b29e68
- install with -p so that timestamps are preserved
b29e68
b29e68
* Wed Nov 07 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.5-0.2
b29e68
- Requires only malaga-suomi-voikko, BR malaga-devel and malaga-suomi-voikko
b29e68
- Remove static archive
b29e68
b29e68
* Wed Oct 24 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.5-0.1
b29e68
- Initial package