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 Patch5: %{name}-format.patch
22 URL: http://tomoe.sourceforge.jp/
23 BuildRequires: apr-util-devel
24 BuildRequires: autoconf >= 2.57
25 BuildRequires: automake
26 BuildRequires: gettext-devel
27 BuildRequires: glib2-devel >= 1:2.4.0
28 BuildRequires: gtk-doc >= 1.4
29 BuildRequires: hyperestraier-devel
30 BuildRequires: intltool >= 0.35.0
31 BuildRequires: libtool
32 BuildRequires: libxslt-progs
33 BuildRequires: mysql-devel
34 BuildRequires: pakchois-devel
35 BuildRequires: perl-XML-Parser
36 BuildRequires: pkgconfig
38 BuildRequires: subversion-devel
40 BuildRequires: python-devel
41 BuildRequires: python-pygobject-devel
42 BuildRequires: python-pygtk-devel
45 BuildRequires: ruby-glib2-devel
47 Requires: glib2 >= 1:2.4.0
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 A program which does Japanese and Chinese handwriting recognition.
53 %description -l pl.UTF-8
54 Program rozpoznający japońskie i chińskie pismo ręczne.
57 Summary: Header files for tomoe library
58 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tomoe
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
61 Requires: glib2-devel >= 1:2.4.0
64 The tomoe-devel package includes the header files for the tomoe
65 package. Install this package if you want to develop programs which
68 %description devel -l pl.UTF-8
69 Ten pakiet zawiera pliki nagłówkowe biblioteki tomoe. Należy go
70 zainstalować, aby rozwijać programy wykorzystujące tomoe.
73 Summary: Tomoe static library
74 Summary(pl.UTF-8): Statyczna biblioteka tomoe
75 Group: Development/Libraries
76 Requires: %{name}-devel = %{version}-%{release}
81 %description static -l pl.UTF-8
82 Statyczna biblioteka tomoe.
84 %package hyperestraier
85 Summary: Hyper Estraier dictionary support for tomoe
86 Summary(pl.UTF-8): Obsługa słowników Hyper Estraiera dla tomoe
88 Requires: %{name} = %{version}-%{release}
90 %description hyperestraier
91 Hyper Estraier dictionary support for tomoe.
93 %description hyperestraier -l pl.UTF-8
94 Obsługa słowników Hyper Estraiera dla tomoe.
97 Summary: MySQL dictionary support for tomoe
98 Summary(pl.UTF-8): Obsługa słowników MySQL dla tomoe
100 Requires: %{name} = %{version}-%{release}
103 MySQL dictionary support for tomoe.
105 %description mysql -l pl.UTF-8
106 Obsługa słowników MySQL dla tomoe.
109 Summary: Subversion dictionary support for tomoe
110 Summary(pl.UTF-8): Obsługa słowników Subversion dla tomoe
112 Requires: %{name} = %{version}-%{release}
115 Subversion dictionary support for tomoe.
117 %description svn -l pl.UTF-8
118 Obsługa słowników Subversion dla tomoe.
120 %package -n python-tomoe
121 Summary: Tomoe bindings for Python
122 Summary(pl.UTF-8): Wiązania tomoe dla Pythona
123 Group: Libraries/Python
124 Requires: %{name} = %{version}-%{release}
126 %description -n python-tomoe
127 Tomoe bindings for Python.
129 %description -n python-tomoe -l pl.UTF-8
130 Wiązania tomoe dla Pythona.
132 %package -n python-tomoe-devel
133 Summary: Development files for Tomoe Python binding
134 Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona do Tomoe
135 Group: Development/Libraries
136 Requires: %{name}-devel = %{version}-%{release}
137 Requires: python-tomoe = %{version}-%{release}
138 Requires: python-pygobject-devel
140 %description -n python-tomoe-devel
141 Development files for Tomoe Python binding.
143 %description -n python-tomoe-devel -l pl.UTF-8
144 Pliki programistyczne wiązań Pythona do Tomoe.
146 %package -n ruby-tomoe
147 Summary: Tomoe bindings for Ruby
148 Summary(pl.UTF-8): Wiązania tomoe dla języka Ruby
149 Group: Development/Languages
150 Requires: %{name} = %{version}-%{release}
153 %description -n ruby-tomoe
154 Tomoe bindings for Ruby.
156 %description -n ruby-tomoe -l pl.UTF-8
157 Wiązania tomoe dla języka Ruby.
159 %package -n ruby-tomoe-devel
160 Summary: Header file for Ruby/Tomoe library
161 Summary(pl.UTF-8): Plik nagłówkowy biblioteki Ruby/Tomoe
162 Group: Development/Libraries
163 Requires: %{name}-devel = %{version}-%{release}
164 Requires: ruby-glib2-devel
165 Requires: ruby-tomoe = %{version}-%{release}
167 %description -n ruby-tomoe-devel
168 Header file for Ruby/Tomoe library.
170 %description -n ruby-tomoe-devel -l pl.UTF-8
171 Plik nagłówkowy biblioteki Ruby/Tomoe.
182 %{__sed} -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb
186 %{__aclocal} -I macros
189 export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
191 UNZIP=/usr/bin/unzip \
192 %{!?with_static_libs:--disable-static} \
194 --with-html-dir=%{_gtkdocdir} \
195 --with-svn-lib=%{_libdir}
200 rm -rf $RPM_BUILD_ROOT
201 install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict
204 DESTDIR=$RPM_BUILD_ROOT
206 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
207 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la}
208 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la}
209 %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/tomoe.{a,la}}
212 %{__rm} $RPM_BUILD_ROOT%{_datadir}/tomoe/xml2est.rb
218 rm -rf $RPM_BUILD_ROOT
220 %post -p /sbin/ldconfig
221 %postun -p /sbin/ldconfig
223 %files -f %{name}.lang
224 %defattr(644,root,root,755)
225 %doc AUTHORS NEWS README TODO data/kanjidic*.html
226 %dir %{_sysconfdir}/tomoe
227 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config
228 %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.*
229 %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.0
230 %dir %{_libdir}/tomoe
231 %dir %{_libdir}/tomoe/module
232 %dir %{_libdir}/tomoe/module/dict
233 %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so
234 %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so
235 %dir %{_libdir}/tomoe/module/recognizer
236 %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so
237 %dir %{_datadir}/tomoe
238 %dir %{_datadir}/tomoe/dict
239 %dir %{_datadir}/tomoe/recognizer
240 %{_datadir}/tomoe/recognizer/handwriting-*.xml
241 %{_datadir}/tomoe/dict.dtd
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/libtomoe.so
247 %{_pkgconfigdir}/tomoe.pc
250 %if %{with static_libs}
252 %defattr(644,root,root,755)
253 %{_libdir}/libtomoe.a
257 %defattr(644,root,root,755)
258 %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so
269 %files -n python-tomoe
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{py_sitedir}/tomoe.so
273 %files -n python-tomoe-devel
274 %defattr(644,root,root,755)
275 %dir %{_datadir}/tomoe/python
276 %{_datadir}/tomoe/python/tomoe.defs
277 %{_pkgconfigdir}/pytomoe.pc
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb
284 %attr(755,root,root) %{ruby_sitearchdir}/tomoe.so
285 %{ruby_sitelibdir}/tomoe.rb
287 %files -n ruby-tomoe-devel
288 %defattr(644,root,root,755)
289 %{ruby_sitearchdir}/rbtomoe.h