%define scimlibdirver		1.4.0
%define _tomoe_ver		0.6.0
%define _libtomoe_gtk_ver	0.6.0

Summary: SCIM module for Tomoe Japanese handwritten character recognition engine Tomoe
Summary(ja): 日本語手書き文字認識エンジン「巴」の SCIM モジュール
Name: scim-tomoe
Version: 0.6.0
Release: 1%{?_dist_release}
Vendor: Project Vine
Distribution: Vine Linux
URL: http://scim-imengine.sourceforge.jp/index.cgi?cmd=view;name=SCIMTomoe
Source0: %{name}-%{version}.tar.gz
License: GPLv2+
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: scim >= 1.4.5
Requires: tomoe >= %{_tomoe_ver}, tomoe-gtk >= %{_libtomoe_gtk_ver}
BuildRequires: scim-devel >= 1.4.5
BuildRequires: tomoe-devel >= %{_tomoe_ver}
BuildRequires: tomoe-gtk-devel >= %{_libtomoe_gtk_ver}

%description
SCIM module for Tomoe Japanese handwritten character recognition engine Tomoe

%description -l ja
日本語手書き文字認識エンジン「巴」の SCIM モジュール

%prep
%setup -q

%build
%configure \
    --disable-static
%__make %{?_smp_mflags}

%install
rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot}

# remove unneeded files
%__rm -f $RPM_BUILD_ROOT%{_libdir}/scim-1.0/*/*/*.la

%find_lang %{name}

# remove unpackaged files
rm -rf %{buildroot}%{_libdir}/scim-1.0/%{scimlibdirver}/Helper/tomoe.{a,la}

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_bindir}/scim-tomoe
%{_libdir}/scim-1.0/%{scimlibdirver}/Helper/tomoe.so
%{_datadir}/scim/icons/scim-tomoe.png

%changelog
* Sun May 31 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.6.0-1
- new upstream release
- added --disable-static in %%configure
- dropped scim-tomoe-0.3.0-moduledir.patch

* Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 0.5.0-1vl5
- applied new versioning policy, spec in utf-8

* Sun Dec 31 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.5.0-0vl1
- new upstream release
- update required version of tomoe, libtomoe-gtk
- update %%files section

* Thu Dec 14 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.3.0-0vl2
- rebuilt with scim-1.4.5, Requires/BuildRequires bumped up to 1.4.5
- add Patch10 to fix Helper module path

* Sat Nov 25 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.3.0-0vl1
- new upstream release
- fix dependency
  - Requires: libtomoe-gtk instead of libtomoe-gtk-devel
  - BuildRequires: libtomoe-gtk-devel instead of libtomoe-gtk

* Tue Apr 11 2006 IWAI, Masaharu <iwai@alib.jp> 0.2.0-0vl1
- Initial build.
