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 URL: http://tomoe.sourceforge.jp/
24 BuildRequires: apr-util-devel
25 BuildRequires: autoconf >= 2.57
26 BuildRequires: automake
27 BuildRequires: gettext-tools
28 BuildRequires: glib2-devel >= 1:2.4.0
29 BuildRequires: gtk-doc >= 1.4
30 BuildRequires: hyperestraier-devel
31 BuildRequires: intltool >= 0.35.0
32 BuildRequires: libtool
33 BuildRequires: libxslt-progs
34 BuildRequires: mysql-devel
35 BuildRequires: pakchois-devel
36 BuildRequires: perl-XML-Parser
37 BuildRequires: pkgconfig
39 BuildRequires: subversion-devel
41 BuildRequires: python-devel
42 BuildRequires: python-pygobject-devel
43 BuildRequires: python-pygtk-devel >= 2:2.0
46 BuildRequires: ruby-glib2-devel
48 Requires: glib2 >= 1:2.4.0
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 A program which does Japanese and Chinese handwriting recognition.
54 %description -l pl.UTF-8
55 Program rozpoznający japońskie i chińskie pismo ręczne.
58 Summary: Header files for tomoe library
59 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tomoe
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
62 Requires: glib2-devel >= 1:2.4.0
65 The tomoe-devel package includes the header files for the tomoe
66 package. Install this package if you want to develop programs which
69 %description devel -l pl.UTF-8
70 Ten pakiet zawiera pliki nagłówkowe biblioteki tomoe. Należy go
71 zainstalować, aby rozwijać programy wykorzystujące tomoe.
74 Summary: Tomoe static library
75 Summary(pl.UTF-8): Statyczna biblioteka tomoe
76 Group: Development/Libraries
77 Requires: %{name}-devel = %{version}-%{release}
82 %description static -l pl.UTF-8
83 Statyczna biblioteka tomoe.
85 %package hyperestraier
86 Summary: Hyper Estraier dictionary support for tomoe
87 Summary(pl.UTF-8): Obsługa słowników Hyper Estraiera dla tomoe
89 Requires: %{name} = %{version}-%{release}
91 %description hyperestraier
92 Hyper Estraier dictionary support for tomoe.
94 %description hyperestraier -l pl.UTF-8
95 Obsługa słowników Hyper Estraiera dla tomoe.
98 Summary: MySQL dictionary support for tomoe
99 Summary(pl.UTF-8): Obsługa słowników MySQL dla tomoe
101 Requires: %{name} = %{version}-%{release}
104 MySQL dictionary support for tomoe.
106 %description mysql -l pl.UTF-8
107 Obsługa słowników MySQL dla tomoe.
110 Summary: Subversion dictionary support for tomoe
111 Summary(pl.UTF-8): Obsługa słowników Subversion dla tomoe
113 Requires: %{name} = %{version}-%{release}
116 Subversion dictionary support for tomoe.
118 %description svn -l pl.UTF-8
119 Obsługa słowników Subversion dla tomoe.
121 %package -n python-tomoe
122 Summary: Tomoe bindings for Python
123 Summary(pl.UTF-8): Wiązania tomoe dla Pythona
124 Group: Libraries/Python
125 Requires: %{name} = %{version}-%{release}
127 %description -n python-tomoe
128 Tomoe bindings for Python.
130 %description -n python-tomoe -l pl.UTF-8
131 Wiązania tomoe dla Pythona.
133 %package -n python-tomoe-devel
134 Summary: Development files for Tomoe Python binding
135 Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona do Tomoe
136 Group: Development/Libraries
137 Requires: %{name}-devel = %{version}-%{release}
138 Requires: python-tomoe = %{version}-%{release}
139 Requires: python-pygobject-devel
141 %description -n python-tomoe-devel
142 Development files for Tomoe Python binding.
144 %description -n python-tomoe-devel -l pl.UTF-8
145 Pliki programistyczne wiązań Pythona do Tomoe.
147 %package -n ruby-tomoe
148 Summary: Tomoe bindings for Ruby
149 Summary(pl.UTF-8): Wiązania tomoe dla języka Ruby
150 Group: Development/Languages
151 Requires: %{name} = %{version}-%{release}
154 %description -n ruby-tomoe
155 Tomoe bindings for Ruby.
157 %description -n ruby-tomoe -l pl.UTF-8
158 Wiązania tomoe dla języka Ruby.
160 %package -n ruby-tomoe-devel
161 Summary: Header file for Ruby/Tomoe library
162 Summary(pl.UTF-8): Plik nagłówkowy biblioteki Ruby/Tomoe
163 Group: Development/Libraries
164 Requires: %{name}-devel = %{version}-%{release}
165 Requires: ruby-glib2-devel
166 Requires: ruby-tomoe = %{version}-%{release}
168 %description -n ruby-tomoe-devel
169 Header file for Ruby/Tomoe library.
171 %description -n ruby-tomoe-devel -l pl.UTF-8
172 Plik nagłówkowy biblioteki Ruby/Tomoe.
184 %{__sed} -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb
189 %{__aclocal} -I macros
192 export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
194 UNZIP=/usr/bin/unzip \
195 %{!?with_static_libs:--disable-static} \
196 %{?with_ruby:--with-ruby-bindingdir=%{ruby_vendorarchdir}} \
197 %{?with_ruby:--with-ruby-libdir=%{ruby_vendorlibdir}} \
199 --with-html-dir=%{_gtkdocdir} \
200 --with-svn-lib=%{_libdir}
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict
209 DESTDIR=$RPM_BUILD_ROOT
211 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
212 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la}
213 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la}
214 %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/tomoe.{a,la}}
217 %{__rm} $RPM_BUILD_ROOT%{_datadir}/tomoe/xml2est.rb
223 rm -rf $RPM_BUILD_ROOT
225 %post -p /sbin/ldconfig
226 %postun -p /sbin/ldconfig
228 %files -f %{name}.lang
229 %defattr(644,root,root,755)
230 %doc AUTHORS NEWS README TODO data/kanjidic*.html
231 %dir %{_sysconfdir}/tomoe
232 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config
233 %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.*
234 %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.0
235 %dir %{_libdir}/tomoe
236 %dir %{_libdir}/tomoe/module
237 %dir %{_libdir}/tomoe/module/dict
238 %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so
239 %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so
240 %dir %{_libdir}/tomoe/module/recognizer
241 %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so
242 %dir %{_datadir}/tomoe
243 %dir %{_datadir}/tomoe/dict
244 %dir %{_datadir}/tomoe/recognizer
245 %{_datadir}/tomoe/recognizer/handwriting-*.xml
246 %{_datadir}/tomoe/dict.dtd
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/libtomoe.so
252 %{_pkgconfigdir}/tomoe.pc
255 %if %{with static_libs}
257 %defattr(644,root,root,755)
258 %{_libdir}/libtomoe.a
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so
274 %files -n python-tomoe
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{py_sitedir}/tomoe.so
278 %files -n python-tomoe-devel
279 %defattr(644,root,root,755)
280 %dir %{_datadir}/tomoe/python
281 %{_datadir}/tomoe/python/tomoe.defs
282 %{_pkgconfigdir}/pytomoe.pc
287 %defattr(644,root,root,755)
288 %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb
289 %attr(755,root,root) %{ruby_vendorarchdir}/tomoe.so
290 %{ruby_vendorlibdir}/tomoe.rb
292 %files -n ruby-tomoe-devel
293 %defattr(644,root,root,755)
294 %{ruby_vendorarchdir}/rbtomoe.h