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 URL: http://tomoe.sourceforge.jp/
19 BuildRequires: gettext
20 BuildRequires: glib2-devel
21 BuildRequires: gtk-doc
22 BuildRequires: intltool
23 BuildRequires: libtool
24 BuildRequires: perl(XML::Parser)
27 BuildRequires: python-devel
28 BuildRequires: python-pygobject-devel
29 BuildRequires: python-pygtk-devel
32 BuildRequires: ruby-gnome2-devel
34 BuildRequires: apr-util-devel
35 BuildRequires: hyperestraier-devel
36 BuildRequires: mysql-devel
37 BuildRequires: pakchois-devel
38 BuildRequires: subversion-devel
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 A program which does Japanese handwriting recognition.
45 Summary: Tomoe development files
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
50 The tomoe-devel package includes the header files for the tomoe
51 package. Install this package if you want to develop programs which
55 Summary: Tomoe static library
56 Group: Development/Libraries
57 Requires: %{name}-devel = %{version}-%{release}
62 %package hyperestraier
63 Summary: Hyper Estraier dictionary support for tomoe
64 Group: Development/Libraries
65 Requires: %{name}-devel = %{version}-%{release}
67 %description hyperestraier
68 Hyper Estraier dictionary support for tomoe.
71 Summary: Mysql dictionary support for tomoe
72 Group: Development/Libraries
73 Requires: %{name}-devel = %{version}-%{release}
76 Mysql dictionary support for tomoe.
79 Summary: Subversion dictionary support for tomoe
80 Group: Development/Libraries
81 Requires: %{name}-devel = %{version}-%{release}
84 Subversion dictionary support for tomoe.
86 %package -n python-tomoe
87 Summary: Tomoe bindings for python
88 Group: Development/Libraries
89 Requires: %{name} = %{version}-%{release}
91 %description -n python-tomoe
92 Tomoe bindings for python.
94 %package -n ruby-tomoe
95 Summary: Tomoe bindings for ruby
96 Group: Development/Libraries
97 Requires: %{name} = %{version}-%{release}
99 %description -n ruby-tomoe
100 Tomoe bindings for ruby.
108 %{__sed} 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb
112 %{__aclocal} -I macros
115 export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
117 %{!?with_static_libs:--disable-static} \
118 --with-svn-lib=%{_libdir} \
120 --with-html-dir=%{_gtkdocdir}
125 rm -rf $RPM_BUILD_ROOT
127 DESTDIR=$RPM_BUILD_ROOT
129 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
130 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la}
131 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la}
136 rm -rf $RPM_BUILD_ROOT
138 %post -p /sbin/ldconfig
139 %postun -p /sbin/ldconfig
141 %files -f %{name}.lang
142 %defattr(644,root,root,755)
143 %doc AUTHORS NEWS README TODO data/kanjidic*.html
144 %dir %{_sysconfdir}/tomoe
145 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config
146 %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.*
147 %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.[0-9]
148 %dir %{_libdir}/tomoe
149 %dir %{_libdir}/tomoe/module
150 %dir %{_libdir}/tomoe/module/dict
151 %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so
152 %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so
153 %dir %{_libdir}/tomoe/module/recognizer
154 %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so
155 %dir %{_datadir}/tomoe
156 %dir %{_datadir}/tomoe/dict
157 %dir %{_datadir}/tomoe/recognizer
158 %{_datadir}/tomoe/recognizer/*.xml
159 %{_datadir}/tomoe/dict.dtd
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/libtomoe.so
165 %{_pkgconfigdir}/tomoe.pc
168 %if %{with static_libs}
170 %defattr(644,root,root,755)
171 %{_libdir}/libtomoe.a
175 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so
188 %defattr(644,root,root,755)
190 %{_libdir}/ruby/site_ruby/1.8/tomoe.rb
191 %{_libdir}/ruby/site_ruby/1.8/*-linux/*
192 %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb
196 %files -n python-tomoe
197 %defattr(644,root,root,755)
198 %{_pkgconfigdir}/pytomoe.pc
199 %attr(755,root,root) %{py_sitedir}/tomoe.so
200 %{_datadir}/tomoe/python