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
23 Patch7: %{name}-glibc.patch
24 URL: http://tomoe.sourceforge.jp/
25 BuildRequires: apr-util-devel
26 BuildRequires: autoconf >= 2.57
27 BuildRequires: automake
28 BuildRequires: gettext-tools
29 BuildRequires: glib2-devel >= 1:2.4.0
30 BuildRequires: gtk-doc >= 1.4
31 BuildRequires: hyperestraier-devel
32 BuildRequires: intltool >= 0.35.0
33 BuildRequires: libtool
34 BuildRequires: libxslt-progs
35 BuildRequires: mysql-devel
36 BuildRequires: pakchois-devel
37 BuildRequires: perl-XML-Parser
38 BuildRequires: pkgconfig
40 BuildRequires: subversion-devel
42 BuildRequires: python-devel
43 BuildRequires: python-pygobject-devel
44 BuildRequires: python-pygtk-devel >= 2:2.0
47 BuildRequires: ruby-glib2-devel
49 Requires: glib2 >= 1:2.4.0
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 A program which does Japanese and Chinese handwriting recognition.
55 %description -l pl.UTF-8
56 Program rozpoznający japońskie i chińskie pismo ręczne.
59 Summary: Header files for tomoe library
60 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tomoe
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
63 Requires: glib2-devel >= 1:2.4.0
66 The tomoe-devel package includes the header files for the tomoe
67 package. Install this package if you want to develop programs which
70 %description devel -l pl.UTF-8
71 Ten pakiet zawiera pliki nagłówkowe biblioteki tomoe. Należy go
72 zainstalować, aby rozwijać programy wykorzystujące tomoe.
75 Summary: Tomoe static library
76 Summary(pl.UTF-8): Statyczna biblioteka tomoe
77 Group: Development/Libraries
78 Requires: %{name}-devel = %{version}-%{release}
83 %description static -l pl.UTF-8
84 Statyczna biblioteka tomoe.
86 %package hyperestraier
87 Summary: Hyper Estraier dictionary support for tomoe
88 Summary(pl.UTF-8): Obsługa słowników Hyper Estraiera dla tomoe
90 Requires: %{name} = %{version}-%{release}
92 %description hyperestraier
93 Hyper Estraier dictionary support for tomoe.
95 %description hyperestraier -l pl.UTF-8
96 Obsługa słowników Hyper Estraiera dla tomoe.
99 Summary: MySQL dictionary support for tomoe
100 Summary(pl.UTF-8): Obsługa słowników MySQL dla tomoe
102 Requires: %{name} = %{version}-%{release}
105 MySQL dictionary support for tomoe.
107 %description mysql -l pl.UTF-8
108 Obsługa słowników MySQL dla tomoe.
111 Summary: Subversion dictionary support for tomoe
112 Summary(pl.UTF-8): Obsługa słowników Subversion dla tomoe
114 Requires: %{name} = %{version}-%{release}
117 Subversion dictionary support for tomoe.
119 %description svn -l pl.UTF-8
120 Obsługa słowników Subversion dla tomoe.
122 %package -n python-tomoe
123 Summary: Tomoe bindings for Python
124 Summary(pl.UTF-8): Wiązania tomoe dla Pythona
125 Group: Libraries/Python
126 Requires: %{name} = %{version}-%{release}
128 %description -n python-tomoe
129 Tomoe bindings for Python.
131 %description -n python-tomoe -l pl.UTF-8
132 Wiązania tomoe dla Pythona.
134 %package -n python-tomoe-devel
135 Summary: Development files for Tomoe Python binding
136 Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona do Tomoe
137 Group: Development/Libraries
138 Requires: %{name}-devel = %{version}-%{release}
139 Requires: python-tomoe = %{version}-%{release}
140 Requires: python-pygobject-devel
142 %description -n python-tomoe-devel
143 Development files for Tomoe Python binding.
145 %description -n python-tomoe-devel -l pl.UTF-8
146 Pliki programistyczne wiązań Pythona do Tomoe.
148 %package -n ruby-tomoe
149 Summary: Tomoe bindings for Ruby
150 Summary(pl.UTF-8): Wiązania tomoe dla języka Ruby
151 Group: Development/Languages
152 Requires: %{name} = %{version}-%{release}
155 %description -n ruby-tomoe
156 Tomoe bindings for Ruby.
158 %description -n ruby-tomoe -l pl.UTF-8
159 Wiązania tomoe dla języka Ruby.
161 %package -n ruby-tomoe-devel
162 Summary: Header file for Ruby/Tomoe library
163 Summary(pl.UTF-8): Plik nagłówkowy biblioteki Ruby/Tomoe
164 Group: Development/Libraries
165 Requires: %{name}-devel = %{version}-%{release}
166 Requires: ruby-glib2-devel
167 Requires: ruby-tomoe = %{version}-%{release}
169 %description -n ruby-tomoe-devel
170 Header file for Ruby/Tomoe library.
172 %description -n ruby-tomoe-devel -l pl.UTF-8
173 Plik nagłówkowy biblioteki Ruby/Tomoe.
186 %{__sed} -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb
191 %{__aclocal} -I macros
194 export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
196 UNZIP=/usr/bin/unzip \
197 %{!?with_static_libs:--disable-static} \
198 %{?with_ruby:--with-ruby-bindingdir=%{ruby_vendorarchdir}} \
199 %{?with_ruby:--with-ruby-libdir=%{ruby_vendorlibdir}} \
201 --with-html-dir=%{_gtkdocdir} \
202 --with-svn-lib=%{_libdir}
207 rm -rf $RPM_BUILD_ROOT
208 install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict
211 DESTDIR=$RPM_BUILD_ROOT
213 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
214 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la}
215 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la}
216 %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/tomoe.{a,la}}
219 %{__rm} $RPM_BUILD_ROOT%{_datadir}/tomoe/xml2est.rb
225 rm -rf $RPM_BUILD_ROOT
227 %post -p /sbin/ldconfig
228 %postun -p /sbin/ldconfig
230 %files -f %{name}.lang
231 %defattr(644,root,root,755)
232 %doc AUTHORS NEWS README TODO data/kanjidic*.html
233 %dir %{_sysconfdir}/tomoe
234 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config
235 %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.0
237 %dir %{_libdir}/tomoe
238 %dir %{_libdir}/tomoe/module
239 %dir %{_libdir}/tomoe/module/dict
240 %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so
241 %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so
242 %dir %{_libdir}/tomoe/module/recognizer
243 %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so
244 %dir %{_datadir}/tomoe
245 %dir %{_datadir}/tomoe/dict
246 %dir %{_datadir}/tomoe/recognizer
247 %{_datadir}/tomoe/recognizer/handwriting-*.xml
248 %{_datadir}/tomoe/dict.dtd
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_libdir}/libtomoe.so
254 %{_pkgconfigdir}/tomoe.pc
257 %if %{with static_libs}
259 %defattr(644,root,root,755)
260 %{_libdir}/libtomoe.a
264 %defattr(644,root,root,755)
265 %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so
276 %files -n python-tomoe
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{py_sitedir}/tomoe.so
280 %files -n python-tomoe-devel
281 %defattr(644,root,root,755)
282 %dir %{_datadir}/tomoe/python
283 %{_datadir}/tomoe/python/tomoe.defs
284 %{_pkgconfigdir}/pytomoe.pc
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb
291 %attr(755,root,root) %{ruby_vendorarchdir}/tomoe.so
292 %{ruby_vendorlibdir}/tomoe.rb
294 %files -n ruby-tomoe-devel
295 %defattr(644,root,root,755)
296 %{ruby_vendorarchdir}/rbtomoe.h