[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Help with packaging tmispell-voikko (Ispell compatible Finnish spellchecking)



Hi,

I hope this is the correct list for this kind of questions, also sorry for the 
lengthy mail...

Voikko is a free software spellchecker and hyphenator for the Finnish language 
<http://voikko.sourceforge.net/>. Voikko actually works quite well, I'd say 
it's the best free software has to offer currently in the field of Finnish 
spell checking.

I've taken an interest in packaging Voikko, it's dependencies and the 
applications based on it that are released by the Voikko project. Libvoikko 
and it's dependencies malaga and suomi-malaga (packaged as 
malaga-suomi-voikko) are already in Fedora.

The next application to package is tmispell-voikko, but as packaging is quite 
new to me, I've found this one a bit more difficult than some of the previous 
packages.

The main problem is this: the package provides a binary /usr/bin/tmispell, 
which is intended to be "a transparent wrapper around Ispell", so that it 
does the spell checking by itself if you call it with Finnish and calls 
ispell otherwise. The README 
<http://vpv.fedorapeople.org/packages/README.tmispell-voikko> says that 
tmispell should be installed to /usr/bin/ispell and the real ispell 
executable should be moved to e.g. /usr/bin/ispell.real. Then the location of 
the real ispell should be set in the configuration file of tmispell-voikko.

In Fedora /usr/bin/ispell is provided by the aspell package and I assume it's 
not good packaging to move around files that belong to other packages. But 
placing tmispell to /usr/bin/ispell is apparently the only way KDE (and 
possibly other ispell compatible programs) can use tmispell.

The Voikko main maintainer had this suggestion: as /usr/bin/ispell in Fedora 
is a script, we could place tmispell to /usr/bin/tmispell and modify the 
ispell script to call tmispell when Finnish is used. What do you think? If we 
do this, it'll probably be rawhide-only stuff?

Even if I can't place tmispell to /usr/bin/ispell or edit the ispell script in 
F-7 and F-8, I still think it would be nice to have tmispell "as such" in 
these releases as well. At least tmispell could be used as a CLI frontend to 
libvoikko, even if programs like KDE can't see it.

Enchant people please note: the tmispell-voikko package also provides a Voikko 
plugin for Enchant, which I've named enchant-voikko. The plugin will probably 
be in the next stable enchant release as well, but I believe it won't hurt to 
package it separately until that's released. This would hopefully add support 
for Finnish spell checking in rawhide's KDE4, among others, I haven't had a 
chance to test it, though.

I haven't yet made a review request for this package, I thought it would be 
better to discuss these issues first on the list instead of giving them to a 
single reviewer to solve.

The spec file is at 
<http://vpv.fedorapeople.org/packages/tmispell-voikko.spec>
The SRPM is at 
<http://vpv.fedorapeople.org/packages/tmispell-voikko-0.6.3-0.1.fc8.src.rpm>

I'll also post the spec file here for easier comments. I'm awaiting your 
feedback :)


Name:           tmispell-voikko
Version:        0.6.3
Release:        0.1%{?dist}
Summary:        An Ispell compatible front-end for spell-checking modules

Group:          System Environment/Libraries
License:        GPLv2+
URL:            http://voikko.sourceforge.net/
Source0:        
http://downloads.sourceforge.net/voikko/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libvoikko-devel ncurses-devel gettext pkgconfig glib2-devel 
enchant-devel

%description
Tmispell is an Ispell compatible front-end for spell-checking
modules. To do the actual spell-checking for Finnish language it uses
the spell-checking system Voikko.

# FIXME: /usr/bin/ispell should be a symlink to /usr/bin/tmispell and the real
# ispell should be renamed to e.g. /usr/bin/ispell.real for KDE etc. to work.
# The other option would be to modify /usr/bin/ispell to call
# /usr/bin/tmispell when it's called with Finnish. If neither of these can be
# done, it's worth it to have /usr/bin/tmispell as a command line client for
# Voikko.

%package -n 	enchant-voikko
Summary:        Voikko spellchecker support for Enchant
Group:          Development/Libraries


%description -n enchant-voikko
Voikko spellchecker support for Enchant.


%prep
%setup -q


%build
%configure --disable-static
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
# Install the configuration file
sed -i -e 's/ispell.real/ispell/' tmispell.conf.example
install -Dpm 0644 tmispell.conf.example 
$RPM_BUILD_ROOT%{_sysconfdir}/tmispell.conf
# Fake Finnish dictionary for ispell clients. These won't actually work for
# KDE etc. unless the binary is in /usr/bin/ispell. These are always installed
# into %{_prefix}/lib/ispell/ even though it's an rpmlint error because my
# testing shows that KDE recognizes them from there but not from /usr/share.
install -dm 755 %{buildroot}%{_prefix}/lib/ispell
touch %{buildroot}%{_prefix}/lib/ispell/suomi.{hash,aff}
%find_lang %{name}


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc ChangeLog NEWS README README.fi
%config(noreplace) %{_sysconfdir}/tmispell.conf
%{_mandir}/man1/tmispell*
%{_mandir}/man5/tmispell*
%{_bindir}/tmispell
%{_prefix}/lib/ispell


%files -n enchant-voikko
%{_libdir}/enchant/libenchant_voikko*.so.*
%{_libdir}/enchant/libenchant_voikko.so


%changelog
* Mon Nov 26 2007 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 0.6.3-0.1
- Initial package


-- 
Ville-Pekka Vainio


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]