3 %bcond_without python # build without python bindings
4 %bcond_with ruby # build with ruby bindings
5 %bcond_without static_libs # don't build static libraries
7 Summary: Handwritten input system for Japanese and Chinese
13 Source0: http://downloads.sourceforge.net/tomoe/%{name}-%{version}.tar.gz
14 # Source0-md5: 0e51e88d097085e101bf722fc04808ed
15 Patch0: %{name}-multiarch-conflict.patch
16 Patch1: %{name}-bz502662.patch
17 Patch2: %{name}-svn-libs.patch
18 Patch3: %{name}-glib2.32.patch
19 URL: http://tomoe.sourceforge.jp/
20 BuildRequires: gettext
21 BuildRequires: glib2-devel
22 BuildRequires: gtk-doc
23 BuildRequires: intltool
24 BuildRequires: libtool
25 BuildRequires: perl(XML::Parser)
28 BuildRequires: python-devel
29 BuildRequires: python-pygobject-devel
30 BuildRequires: python-pygtk-devel
33 BuildRequires: ruby-gnome2-devel
35 BuildRequires: apr-util-devel
36 BuildRequires: hyperestraier-devel
37 BuildRequires: mysql-devel
38 BuildRequires: pakchois-devel
39 BuildRequires: subversion-devel
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 A program which does Japanese handwriting recognition.
46 Summary: Tomoe development files
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
51 The tomoe-devel package includes the header files for the tomoe
52 package. Install this package if you want to develop programs which
56 Summary: Tomoe static library
57 Group: Development/Libraries
58 Requires: %{name}-devel = %{version}-%{release}
63 %package hyperestraier
64 Summary: Hyper Estraier dictionary support for tomoe
65 Group: Development/Libraries
66 Requires: %{name}-devel = %{version}-%{release}
68 %description hyperestraier
69 Hyper Estraier dictionary support for tomoe.
72 Summary: Mysql dictionary support for tomoe
73 Group: Development/Libraries
74 Requires: %{name}-devel = %{version}-%{release}
77 Mysql dictionary support for tomoe.
80 Summary: Subversion dictionary support for tomoe
81 Group: Development/Libraries
82 Requires: %{name}-devel = %{version}-%{release}
85 Subversion dictionary support for tomoe.
87 %package -n python-tomoe
88 Summary: Tomoe bindings for python
89 Group: Development/Libraries
90 Requires: %{name} = %{version}-%{release}
92 %description -n python-tomoe
93 Tomoe bindings for python.
95 %package -n ruby-tomoe
96 Summary: Tomoe bindings for ruby
97 Group: Development/Libraries
98 Requires: %{name} = %{version}-%{release}
100 %description -n ruby-tomoe
101 Tomoe bindings for ruby.
110 %{__sed} 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb
114 %{__aclocal} -I macros
117 export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
119 %{!?with_static_libs:--disable-static} \
120 --with-svn-lib=%{_libdir} \
122 --with-html-dir=%{_gtkdocdir}
127 rm -rf $RPM_BUILD_ROOT
128 install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict
131 DESTDIR=$RPM_BUILD_ROOT
133 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
134 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la}
135 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la}
140 rm -rf $RPM_BUILD_ROOT
142 %post -p /sbin/ldconfig
143 %postun -p /sbin/ldconfig
145 %files -f %{name}.lang
146 %defattr(644,root,root,755)
147 %doc AUTHORS NEWS README TODO data/kanjidic*.html
148 %dir %{_sysconfdir}/tomoe
149 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config
150 %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.*
151 %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.[0-9]
152 %dir %{_libdir}/tomoe
153 %dir %{_libdir}/tomoe/module
154 %dir %{_libdir}/tomoe/module/dict
155 %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so
156 %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so
157 %dir %{_libdir}/tomoe/module/recognizer
158 %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so
159 %dir %{_datadir}/tomoe
160 %dir %{_datadir}/tomoe/dict
161 %dir %{_datadir}/tomoe/recognizer
162 %{_datadir}/tomoe/recognizer/*.xml
163 %{_datadir}/tomoe/dict.dtd
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/libtomoe.so
169 %{_pkgconfigdir}/tomoe.pc
172 %if %{with static_libs}
174 %defattr(644,root,root,755)
175 %{_libdir}/libtomoe.a
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so
192 %defattr(644,root,root,755)
194 %{_libdir}/ruby/site_ruby/1.8/tomoe.rb
195 %{_libdir}/ruby/site_ruby/1.8/*-linux/*
196 %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb
200 %files -n python-tomoe
201 %defattr(644,root,root,755)
202 %{_pkgconfigdir}/pytomoe.pc
203 %attr(755,root,root) %{py_sitedir}/tomoe.so
204 %{_datadir}/tomoe/python