35f57d2
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
fca9437
Name:           libvoikko
Ville-Pekka Vainio 16745aa
Version:        3.1
Ville-Pekka Vainio 9f06745
Release:        3%{?dist}
fca9437
Summary:        Voikko is a library for spellcheckers and hyphenators
fca9437
fca9437
Group:          System Environment/Libraries
fca9437
License:        GPLv2+
fca9437
URL:            http://voikko.sourceforge.net/
1d6dbda
# The usual format of stable release URLs
1be43e1
Source0:        http://downloads.sourceforge.net/voikko/%{name}-%{version}.tar.gz
1d6dbda
# The usual format of test release URLs
1be43e1
#Source0:        http://www.puimula.org/htp/testing/%{name}-%{version}rc1.tar.gz
Ville-Pekka Vainio 9f06745
Patch0:         libvoikko-3.1-gcc-4.6-fix.patch
fca9437
9cf0795
BuildRequires:  python-devel
1e18ecb
# Libvoikko >= 2.2 needs this, earlier versions won't work
1e18ecb
Requires:       malaga-suomi-voikko >= 1.4
fca9437
fca9437
%description
fca9437
This is libvoikko, library for spellcheckers and hyphenators using Malaga
fca9437
natural language grammar development tool. The library is written in C.
fca9437
fca9437
Currently only Finnish is supported, but the API of the library has been
fca9437
designed to allow adding support for other languages later. Note however that
fca9437
Malaga is rather low level tool that requires implementing the whole morphology
fca9437
of a language as a left associative grammar. Therefore languages that have
fca9437
simple or even moderately complex morphologies and do not require morphological
fca9437
analysis in their hyphenators should be implemented using other tools such as
fca9437
Hunspell.
fca9437
fca9437
%package        devel
fca9437
Summary:        Development files for %{name}
fca9437
Group:          Development/Libraries
ea7787f
Requires:       %{name} = %{version}-%{release} pkgconfig
fca9437
fca9437
%description    devel
fca9437
The %{name}-devel package contains libraries and header files for
fca9437
developing applications that use %{name}.
fca9437
0b39fcd
%package -n     voikko-tools
0b39fcd
Summary:        Test tools for %{name}
0b39fcd
Group:          Applications/Text
0b39fcd
Requires:       %{name} = %{version}-%{release}
0b39fcd
0b39fcd
%description -n voikko-tools
0b39fcd
This package contains voikkospell and voikkohyphenate, small command line
0b39fcd
tools for testing libvoikko. These tools may also be useful for shell
0b39fcd
scripts.
fca9437
35f57d2
%package -n     python-libvoikko
35f57d2
Summary:        Python interface to %{name}
35f57d2
Group:          Development/Libraries
35f57d2
Requires:       %{name} = %{version}-%{release}
5d20fb7
# Note: noarch subpackage, only works in Fedora >= 11
5d20fb7
BuildArch:      noarch
35f57d2
35f57d2
%description -n python-libvoikko
35f57d2
Python interface to libvoikko, library of Finnish language tools.
35f57d2
This module can be used to perform various natural language analysis
35f57d2
tasks on Finnish text.
35f57d2
35f57d2
fca9437
%prep
fca9437
%setup -q
Ville-Pekka Vainio 9f06745
%patch0 -p1
fca9437
fca9437
fca9437
%build
fca9437
# The dictionary path must be the same where malaga-suomi-voikko is installed
fca9437
%configure --with-dictionary-path=%{_libdir}/voikko
3958114
# Remove rpath,
3958114
# https://fedoraproject.org/wiki/Packaging/Guidelines#Removing_Rpath
3958114
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
3958114
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
fca9437
make %{?_smp_mflags}
fca9437
fca9437
fca9437
%install
fca9437
rm -rf $RPM_BUILD_ROOT
fca9437
make install INSTALL="install -p" DESTDIR=$RPM_BUILD_ROOT
fca9437
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
fca9437
# Remove static archive
fca9437
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
35f57d2
# Install the Python interface
35f57d2
install -d $RPM_BUILD_ROOT%{python_sitelib}
35f57d2
install -pm 0644 python/libvoikko.py $RPM_BUILD_ROOT%{python_sitelib}/
fca9437
fca9437
fca9437
%post -p /sbin/ldconfig
fca9437
fca9437
%postun -p /sbin/ldconfig
fca9437
fca9437
fca9437
%files
fca9437
%defattr(-,root,root,-)
fca9437
%doc ChangeLog COPYING README
fca9437
%{_libdir}/*.so.*
0b39fcd
0b39fcd
%files -n voikko-tools
1d6dbda
%defattr(-,root,root,-)
fca9437
%{_bindir}/voikkospell
fca9437
%{_bindir}/voikkohyphenate
1d6dbda
%{_bindir}/voikkogc
fca9437
%{_mandir}/man1/voikkohyphenate.1.gz
fca9437
%{_mandir}/man1/voikkospell.1.gz
1d6dbda
%{_mandir}/man1/voikkogc.1.gz
fca9437
fca9437
%files devel
fca9437
%defattr(-,root,root,-)
fca9437
%doc
fca9437
%{_includedir}/*
fca9437
%{_libdir}/*.so
d6adad0
%{_libdir}/pkgconfig/libvoikko.pc
fca9437
35f57d2
%files -n python-libvoikko
35f57d2
%defattr(-,root,root,-)
35f57d2
%{python_sitelib}/%{name}.py*
35f57d2
fca9437
%changelog
Ville-Pekka Vainio 9f06745
* Tue Feb 15 2011 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.1-3
Ville-Pekka Vainio 9f06745
- Add patch to fix build with GCC 4.6
Ville-Pekka Vainio 9f06745
d842068
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-2
d842068
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d842068
Ville-Pekka Vainio 16745aa
* Mon Nov 22 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.1-1
Ville-Pekka Vainio 16745aa
- New upstream release
Ville-Pekka Vainio 16745aa
- Remove the unneeded %%clean section, not needed in Fedora >= 13
Ville-Pekka Vainio 16745aa
ec0e4dd
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.0-2
ec0e4dd
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
ec0e4dd
1be43e1
* Thu May 27 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.0-1
1be43e1
- 3.0 final
1be43e1
f76eb65
* Thu May 13 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.0-0.1.rc1
f76eb65
- New upstream release candidate with multithread support
f76eb65
- Remove unneeded BuildRoot tag
f76eb65
25f02bc
* Thu Feb 18 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.3.1-1
25f02bc
- Version 2.3.1 contains fixes for bugs found in version 2.3
25f02bc
9cf0795
* Sun Jan 31 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.3-0.1.rc1
9cf0795
- New release candidate
9cf0795
- Dependency on glib has been removed
9cf0795
b783f78
* Wed Nov 11 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2.2-1
b783f78
- Version 2.2.2 fixes a crash found in version 2.2.1 that can occur when the
b783f78
  APIs that use wchar_t strings as arguments are used.
b783f78
5d20fb7
* Mon Oct 26 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2.1-2
5d20fb7
- Add Python interface (package python-libvoikko, noarch)
35f57d2
a6387c2
* Fri Oct 09 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2.1-1
a6387c2
- New upstream release, fixes bugs found in 2.2
a6387c2
419ebc9
* Fri Sep 18 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2-0.3.rc2
419ebc9
- 2.2rc2
419ebc9
- Remove getcwd() value check patch, accepted upstream
419ebc9
3958114
* Wed Sep 16 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2-0.2.rc1
3958114
- Remove rpath which was set for the voikko-tools binaries in 64 bit
3958114
  architechtures
3958114
1e18ecb
* Tue Sep 15 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2-0.1.rc1
1e18ecb
- New release candidate
1e18ecb
- Improvements to spelling suggestions, grammar checker etc.
1e18ecb
- Libvoikko now uses its own internal implementation of malaga.
1e18ecb
- This prevents symbol conflicts such as https://bugzilla.redhat.com/502546
1e18ecb
- BuildRequires malaga removed and glib2-devel added.
1e18ecb
- Require malaga-suomi-voikko >= 1.4, libvoikko 2.2 expects the newer
1e18ecb
  dictionary format
1e18ecb
- Add a patch to make it compile on Fedora with -Werror
1e18ecb
39a790b
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2
39a790b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
39a790b
49cdde3
* Sat May 2 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-1
49cdde3
- 2.1 final, including fixes to grammar checking
49cdde3
44dac8c
* Fri Apr 17 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.5.rc4
44dac8c
- 2.1rc4:
44dac8c
  - Fix invalid use of delete vs. delete[]
44dac8c
  - Limit the scope of some variables
44dac8c
3e1f438
* Mon Apr 13 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.4.rc3
3e1f438
- 2.1rc3, remove patch
3e1f438
9fccaaa
* Sat Apr 11 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.3.rc2
9fccaaa
- Patch to current SVN HEAD, includes a fix for a memory leak in the grammar
9fccaaa
  checker
9fccaaa
9f5aa4e
* Mon Apr 6 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.2.rc2
9f5aa4e
- New release candidate
9f5aa4e
- Both patches applied upstream
9f5aa4e
9f5aa4e
* Mon Apr 6 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-0.1.rc1
9f5aa4e
- New release candidate
9f5aa4e
- Improvements on grammar checking and dictionary loading
9f5aa4e
- Raise malaga-suomi-voikko dependency to 1.3-10, which has the new dictionary
9f5aa4e
  data directory layout needed by this version of libvoikko
9f5aa4e
- Add BuildRequires python for running the trie compiler during build
9f5aa4e
- Add patch for GCC 4.4 and glibc 2.90 compliance
9f5aa4e
- Add patch to fix warn_unused_result errors
9f5aa4e
ac0a4a6
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-2
ac0a4a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ac0a4a6
ba3918a
* Thu Aug 28 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.0-1
ba3918a
- libvoikko 2.0
ba3918a
1d6dbda
* Sat Aug 23 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.0-0.1.rc1
1d6dbda
- New release candidate, including the new voikkogc tool in voikko-tools
1d6dbda
- Add defattr to voikko-tools
1d6dbda
- Drop upstreamed pkg-config patch
1d6dbda
ea7787f
* Fri May 30 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 1.7-3
ea7787f
- Add Requires pkgconfig to -devel
ea7787f
d6adad0
* Mon May 26 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 1.7-2
d6adad0
- Add patch which makes a libvoikko.pc file for pkg-config
d6adad0
ac3fae5
* Sat May 24 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 1.7-1
ac3fae5
- libvoikko 1.7
ac3fae5
fd9c13d
* Thu May 22 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.7-0.2.rc2
fd9c13d
- Don't BuildRequire the Finnish data files, this should make Koji builds a bit
fd9c13d
  quicker
fd9c13d
fcd3d43
* Sun May 11 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.7-0.1.rc2
fcd3d43
- New release candidate
fcd3d43
0b39fcd
* Sun Mar 02 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-3
0b39fcd
- Put voikkospell and voikkohyphenate into a separate voikko-tools
0b39fcd
  subpackage to decrease the size of the binary libvoikko package
0b39fcd
7a028f5
* Sat Feb 16 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-2
7a028f5
- Rebuild for GCC 4.3
7a028f5
3b30e2a
* Tue Dec 04 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-1
3b30e2a
- libvoikko 1.6
3b30e2a
- Add versioned BuildRequires and Requires as per the Voikko release notes
3b30e2a
  at http://voikko.sourceforge.net/releases.html
3b30e2a
fb1db80
* Mon Dec 03 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-0.4.rc4
fb1db80
- Upstream released a new release candidate
fb1db80
b649352
* Wed Nov 28 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-0.3.rc3
b649352
- Upstream released a new release candidate
b649352
83cccb2
* Wed Nov 28 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-0.2.rc2
83cccb2
- Upstream released a new release candidate
83cccb2
e06cc3a
* Tue Nov 27 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.6-0.1.rc1
e06cc3a
- Upstream released a new release candidate
e06cc3a
fca9437
* Thu Nov 08 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.5-1
fca9437
- Bump Release for the first Fedora build
fca9437
fca9437
* Wed Nov 07 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.5-0.3
fca9437
- libvoikko-devel: remove unneeded Requires: malaga-devel
fca9437
- install with -p so that timestamps are preserved
fca9437
fca9437
* Wed Nov 07 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.5-0.2
fca9437
- Requires only malaga-suomi-voikko, BR malaga-devel and malaga-suomi-voikko
fca9437
- Remove static archive
fca9437
fca9437
* Wed Oct 24 2007 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.5-0.1
fca9437
- Initial package