3 %bcond_without python # build without Python bindings
4 %bcond_without ruby # build without Ruby bindings
5 %bcond_without static_libs # don't build static libraries
7 Summary: Handwritten input system for Japanese and Chinese
8 Summary(pl.UTF-8): System wprowadzania pisma ręcznego dla japońskiego i chińskiego
14 Source0: http://downloads.sourceforge.net/tomoe/%{name}-%{version}.tar.gz
15 # Source0-md5: 0e51e88d097085e101bf722fc04808ed
16 Patch0: %{name}-multiarch-conflict.patch
17 Patch1: %{name}-bz502662.patch
18 Patch2: %{name}-svn-libs.patch
19 Patch3: %{name}-glib2.32.patch
20 Patch4: %{name}-ruby.patch
21 URL: http://tomoe.sourceforge.jp/
22 BuildRequires: apr-util-devel
23 BuildRequires: autoconf >= 2.57
24 BuildRequires: automake
25 BuildRequires: gettext-devel
26 BuildRequires: glib2-devel >= 1:2.4.0
27 BuildRequires: gtk-doc >= 1.4
28 BuildRequires: hyperestraier-devel
29 BuildRequires: intltool >= 0.35.0
30 BuildRequires: libtool
31 BuildRequires: libxslt-progs
32 BuildRequires: mysql-devel
33 BuildRequires: pakchois-devel
34 BuildRequires: perl-XML-Parser
35 BuildRequires: pkgconfig
37 BuildRequires: subversion-devel
39 BuildRequires: python-devel
40 BuildRequires: python-pygobject-devel
41 BuildRequires: python-pygtk-devel
44 BuildRequires: ruby-glib2-devel
46 Requires: glib2 >= 1:2.4.0
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 A program which does Japanese and Chinese handwriting recognition.
52 %description -l pl.UTF-8
53 Program rozpoznający japońskie i chińskie pismo ręczne.
56 Summary: Header files for tomoe library
57 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tomoe
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Requires: glib2-devel >= 1:2.4.0
63 The tomoe-devel package includes the header files for the tomoe
64 package. Install this package if you want to develop programs which
67 %description devel -l pl.UTF-8
68 Ten pakiet zawiera pliki nagłówkowe biblioteki tomoe. Należy go
69 zainstalować, aby rozwijać programy wykorzystujące tomoe.
72 Summary: Tomoe static library
73 Summary(pl.UTF-8): Statyczna biblioteka tomoe
74 Group: Development/Libraries
75 Requires: %{name}-devel = %{version}-%{release}
80 %description static -l pl.UTF-8
81 Statyczna biblioteka tomoe.
83 %package hyperestraier
84 Summary: Hyper Estraier dictionary support for tomoe
85 Summary(pl.UTF-8): Obsługa słowników Hyper Estraiera dla tomoe
87 Requires: %{name} = %{version}-%{release}
89 %description hyperestraier
90 Hyper Estraier dictionary support for tomoe.
92 %description hyperestraier -l pl.UTF-8
93 Obsługa słowników Hyper Estraiera dla tomoe.
96 Summary: MySQL dictionary support for tomoe
97 Summary(pl.UTF-8): Obsługa słowników MySQL dla tomoe
99 Requires: %{name} = %{version}-%{release}
102 MySQL dictionary support for tomoe.
104 %description mysql -l pl.UTF-8
105 Obsługa słowników MySQL dla tomoe.
108 Summary: Subversion dictionary support for tomoe
109 Summary(pl.UTF-8): Obsługa słowników Subversion dla tomoe
111 Requires: %{name} = %{version}-%{release}
114 Subversion dictionary support for tomoe.
116 %description svn -l pl.UTF-8
117 Obsługa słowników Subversion dla tomoe.
119 %package -n python-tomoe
120 Summary: Tomoe bindings for Python
121 Summary(pl.UTF-8): Wiązania tomoe dla Pythona
122 Group: Libraries/Python
123 Requires: %{name} = %{version}-%{release}
125 %description -n python-tomoe
126 Tomoe bindings for Python.
128 %description -n python-tomoe -l pl.UTF-8
129 Wiązania tomoe dla Pythona.
131 %package -n ruby-tomoe
132 Summary: Tomoe bindings for Ruby
133 Summary(pl.UTF-8): Wiązania tomoe dla języka Ruby
134 Group: Development/Languages
135 Requires: %{name} = %{version}-%{release}
138 %description -n ruby-tomoe
139 Tomoe bindings for Ruby.
141 %description -n ruby-tomoe -l pl.UTF-8
142 Wiązania tomoe dla języka Ruby.
144 %package -n ruby-tomoe-devel
145 Summary: Header file for Ruby/Tomoe library
146 Summary(pl.UTF-8): Plik nagłówkowy biblioteki Ruby/Tomoe
147 Group: Development/Libraries
148 Requires: %{name}-devel = %{version}-%{release}
149 Requires: ruby-glib2-devel
150 Requires: ruby-tomoe = %{version}-%{release}
152 %description -n ruby-tomoe-devel
153 Header file for Ruby/Tomoe library.
155 %description -n ruby-tomoe-devel -l pl.UTF-8
156 Plik nagłówkowy biblioteki Ruby/Tomoe.
166 %{__sed} -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb
170 %{__aclocal} -I macros
173 export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
175 UNZIP=/usr/bin/unzip \
176 %{!?with_static_libs:--disable-static} \
178 --with-html-dir=%{_gtkdocdir} \
179 --with-svn-lib=%{_libdir}
184 rm -rf $RPM_BUILD_ROOT
185 install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict
188 DESTDIR=$RPM_BUILD_ROOT
190 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
191 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la}
192 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la}
193 %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/tomoe.{a,la}}
196 %{__rm} $RPM_BUILD_ROOT%{_datadir}/tomoe/xml2est.rb
202 rm -rf $RPM_BUILD_ROOT
204 %post -p /sbin/ldconfig
205 %postun -p /sbin/ldconfig
207 %files -f %{name}.lang
208 %defattr(644,root,root,755)
209 %doc AUTHORS NEWS README TODO data/kanjidic*.html
210 %dir %{_sysconfdir}/tomoe
211 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config
212 %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.*
213 %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.0
214 %dir %{_libdir}/tomoe
215 %dir %{_libdir}/tomoe/module
216 %dir %{_libdir}/tomoe/module/dict
217 %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so
218 %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so
219 %dir %{_libdir}/tomoe/module/recognizer
220 %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so
221 %dir %{_datadir}/tomoe
222 %dir %{_datadir}/tomoe/dict
223 %dir %{_datadir}/tomoe/recognizer
224 %{_datadir}/tomoe/recognizer/handwriting-*.xml
225 %{_datadir}/tomoe/dict.dtd
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libtomoe.so
231 %{_pkgconfigdir}/tomoe.pc
234 %if %{with static_libs}
236 %defattr(644,root,root,755)
237 %{_libdir}/libtomoe.a
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so
253 %files -n python-tomoe
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{py_sitedir}/tomoe.so
256 %{_datadir}/tomoe/python
257 %{_pkgconfigdir}/pytomoe.pc
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb
264 %attr(755,root,root) %{ruby_sitearchdir}/tomoe.so
265 %{ruby_sitelibdir}/tomoe.rb
267 %files -n ruby-tomoe-devel
268 %defattr(644,root,root,755)
269 %{ruby_sitearchdir}/rbtomoe.h