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