]>
Commit | Line | Data |
---|---|---|
ad34972e JR |
1 | # |
2 | # Conditional build: | |
19d2e237 JB |
3 | %bcond_without python # build without Python bindings |
4 | %bcond_without ruby # build without Ruby bindings | |
ad34972e JR |
5 | %bcond_without static_libs # don't build static libraries |
6 | # | |
7 | Summary: Handwritten input system for Japanese and Chinese | |
c325a108 | 8 | Summary(pl.UTF-8): System wprowadzania pisma ręcznego dla japońskiego i chińskiego |
ad34972e JR |
9 | Name: tomoe |
10 | Version: 0.6.0 | |
74b01472 | 11 | Release: 15 |
ad34972e JR |
12 | License: LGPL v2+ |
13 | Group: Libraries | |
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 | |
d2cbbb84 | 19 | Patch3: %{name}-glib2.32.patch |
19d2e237 | 20 | Patch4: %{name}-ruby.patch |
fb2ea8b8 | 21 | Patch5: %{name}-format.patch |
22d315e6 | 22 | Patch6: am.patch |
ad34972e | 23 | URL: http://tomoe.sourceforge.jp/ |
c325a108 | 24 | BuildRequires: apr-util-devel |
19d2e237 JB |
25 | BuildRequires: autoconf >= 2.57 |
26 | BuildRequires: automake | |
5fba1661 JB |
27 | BuildRequires: gettext-devel |
28 | BuildRequires: glib2-devel >= 1:2.4.0 | |
29 | BuildRequires: gtk-doc >= 1.4 | |
c325a108 | 30 | BuildRequires: hyperestraier-devel |
5fba1661 | 31 | BuildRequires: intltool >= 0.35.0 |
19d2e237 | 32 | BuildRequires: libtool |
5fba1661 | 33 | BuildRequires: libxslt-progs |
c325a108 JB |
34 | BuildRequires: mysql-devel |
35 | BuildRequires: pakchois-devel | |
36 | BuildRequires: perl-XML-Parser | |
5fba1661 | 37 | BuildRequires: pkgconfig |
ad34972e | 38 | BuildRequires: python |
c325a108 | 39 | BuildRequires: subversion-devel |
ad34972e JR |
40 | %if %{with python} |
41 | BuildRequires: python-devel | |
42 | BuildRequires: python-pygobject-devel | |
2aac118f | 43 | BuildRequires: python-pygtk-devel >= 2:2.0 |
ad34972e JR |
44 | %endif |
45 | %if %{with ruby} | |
19d2e237 | 46 | BuildRequires: ruby-glib2-devel |
ad34972e | 47 | %endif |
5fba1661 | 48 | Requires: glib2 >= 1:2.4.0 |
ad34972e JR |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
50 | ||
51 | %description | |
5fba1661 | 52 | A program which does Japanese and Chinese handwriting recognition. |
ad34972e | 53 | |
c325a108 | 54 | %description -l pl.UTF-8 |
5fba1661 | 55 | Program rozpoznający japońskie i chińskie pismo ręczne. |
c325a108 | 56 | |
ad34972e | 57 | %package devel |
c325a108 JB |
58 | Summary: Header files for tomoe library |
59 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tomoe | |
ad34972e JR |
60 | Group: Development/Libraries |
61 | Requires: %{name} = %{version}-%{release} | |
5fba1661 | 62 | Requires: glib2-devel >= 1:2.4.0 |
ad34972e JR |
63 | |
64 | %description devel | |
65 | The tomoe-devel package includes the header files for the tomoe | |
66 | package. Install this package if you want to develop programs which | |
67 | use tomoe. | |
68 | ||
c325a108 JB |
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. | |
72 | ||
ad34972e JR |
73 | %package static |
74 | Summary: Tomoe static library | |
c325a108 | 75 | Summary(pl.UTF-8): Statyczna biblioteka tomoe |
ad34972e JR |
76 | Group: Development/Libraries |
77 | Requires: %{name}-devel = %{version}-%{release} | |
78 | ||
79 | %description static | |
80 | Tomoe static library. | |
81 | ||
c325a108 JB |
82 | %description static -l pl.UTF-8 |
83 | Statyczna biblioteka tomoe. | |
84 | ||
ad34972e JR |
85 | %package hyperestraier |
86 | Summary: Hyper Estraier dictionary support for tomoe | |
c325a108 JB |
87 | Summary(pl.UTF-8): Obsługa słowników Hyper Estraiera dla tomoe |
88 | Group: Libraries | |
89 | Requires: %{name} = %{version}-%{release} | |
ad34972e JR |
90 | |
91 | %description hyperestraier | |
92 | Hyper Estraier dictionary support for tomoe. | |
93 | ||
c325a108 JB |
94 | %description hyperestraier -l pl.UTF-8 |
95 | Obsługa słowników Hyper Estraiera dla tomoe. | |
96 | ||
ad34972e | 97 | %package mysql |
c325a108 JB |
98 | Summary: MySQL dictionary support for tomoe |
99 | Summary(pl.UTF-8): Obsługa słowników MySQL dla tomoe | |
100 | Group: Libraries | |
101 | Requires: %{name} = %{version}-%{release} | |
ad34972e JR |
102 | |
103 | %description mysql | |
c325a108 JB |
104 | MySQL dictionary support for tomoe. |
105 | ||
106 | %description mysql -l pl.UTF-8 | |
107 | Obsługa słowników MySQL dla tomoe. | |
ad34972e JR |
108 | |
109 | %package svn | |
110 | Summary: Subversion dictionary support for tomoe | |
c325a108 JB |
111 | Summary(pl.UTF-8): Obsługa słowników Subversion dla tomoe |
112 | Group: Libraries | |
113 | Requires: %{name} = %{version}-%{release} | |
ad34972e JR |
114 | |
115 | %description svn | |
116 | Subversion dictionary support for tomoe. | |
117 | ||
c325a108 JB |
118 | %description svn -l pl.UTF-8 |
119 | Obsługa słowników Subversion dla tomoe. | |
120 | ||
ad34972e | 121 | %package -n python-tomoe |
c325a108 JB |
122 | Summary: Tomoe bindings for Python |
123 | Summary(pl.UTF-8): Wiązania tomoe dla Pythona | |
124 | Group: Libraries/Python | |
ad34972e JR |
125 | Requires: %{name} = %{version}-%{release} |
126 | ||
127 | %description -n python-tomoe | |
c325a108 JB |
128 | Tomoe bindings for Python. |
129 | ||
130 | %description -n python-tomoe -l pl.UTF-8 | |
131 | Wiązania tomoe dla Pythona. | |
ad34972e | 132 | |
f1dff604 JB |
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 | |
140 | ||
141 | %description -n python-tomoe-devel | |
142 | Development files for Tomoe Python binding. | |
143 | ||
144 | %description -n python-tomoe-devel -l pl.UTF-8 | |
145 | Pliki programistyczne wiązań Pythona do Tomoe. | |
146 | ||
ad34972e | 147 | %package -n ruby-tomoe |
c325a108 JB |
148 | Summary: Tomoe bindings for Ruby |
149 | Summary(pl.UTF-8): Wiązania tomoe dla języka Ruby | |
150 | Group: Development/Languages | |
ad34972e | 151 | Requires: %{name} = %{version}-%{release} |
19d2e237 | 152 | Requires: ruby-glib2 |
ad34972e JR |
153 | |
154 | %description -n ruby-tomoe | |
c325a108 JB |
155 | Tomoe bindings for Ruby. |
156 | ||
157 | %description -n ruby-tomoe -l pl.UTF-8 | |
158 | Wiązania tomoe dla języka Ruby. | |
ad34972e | 159 | |
19d2e237 JB |
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} | |
167 | ||
168 | %description -n ruby-tomoe-devel | |
169 | Header file for Ruby/Tomoe library. | |
170 | ||
171 | %description -n ruby-tomoe-devel -l pl.UTF-8 | |
172 | Plik nagłówkowy biblioteki Ruby/Tomoe. | |
173 | ||
ad34972e JR |
174 | %prep |
175 | %setup -q | |
176 | %patch0 -p0 | |
177 | %patch1 -p0 | |
178 | %patch2 -p1 | |
d2cbbb84 | 179 | %patch3 -p1 |
507d005f | 180 | %patch4 -p1 |
fb2ea8b8 | 181 | %patch5 -p1 |
22d315e6 | 182 | %patch6 -p1 |
ad34972e | 183 | |
19d2e237 | 184 | %{__sed} -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb |
ad34972e JR |
185 | |
186 | %build | |
187 | %{__libtoolize} | |
188 | %{__aclocal} -I macros | |
189 | %{__autoconf} | |
190 | %{__automake} | |
191 | export CFLAGS="%{rpmcflags} -I/usr/include/apr-util" | |
192 | %configure \ | |
5fba1661 | 193 | UNZIP=/usr/bin/unzip \ |
ad34972e | 194 | %{!?with_static_libs:--disable-static} \ |
22d315e6 JR |
195 | %{?with_ruby:--with-ruby-bindingdir=%{ruby_vendorarchdir}} \ |
196 | %{?with_ruby:--with-ruby-libdir=%{ruby_vendorlibdir}} \ | |
ad34972e | 197 | --enable-gtk-doc \ |
c325a108 JB |
198 | --with-html-dir=%{_gtkdocdir} \ |
199 | --with-svn-lib=%{_libdir} | |
ad34972e JR |
200 | |
201 | %{__make} | |
202 | ||
203 | %install | |
204 | rm -rf $RPM_BUILD_ROOT | |
ab01150c JR |
205 | install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict |
206 | ||
ad34972e JR |
207 | %{__make} install \ |
208 | DESTDIR=$RPM_BUILD_ROOT | |
209 | ||
210 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
211 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la} | |
212 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la} | |
22d315e6 | 213 | %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/tomoe.{a,la}} |
ad34972e | 214 | |
c325a108 JB |
215 | %if %{without ruby} |
216 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/tomoe/xml2est.rb | |
217 | %endif | |
218 | ||
ad34972e JR |
219 | %find_lang %{name} |
220 | ||
221 | %clean | |
222 | rm -rf $RPM_BUILD_ROOT | |
223 | ||
c325a108 JB |
224 | %post -p /sbin/ldconfig |
225 | %postun -p /sbin/ldconfig | |
ad34972e JR |
226 | |
227 | %files -f %{name}.lang | |
228 | %defattr(644,root,root,755) | |
229 | %doc AUTHORS NEWS README TODO data/kanjidic*.html | |
230 | %dir %{_sysconfdir}/tomoe | |
231 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config | |
232 | %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.* | |
c325a108 | 233 | %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.0 |
ad34972e JR |
234 | %dir %{_libdir}/tomoe |
235 | %dir %{_libdir}/tomoe/module | |
236 | %dir %{_libdir}/tomoe/module/dict | |
237 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so | |
238 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so | |
239 | %dir %{_libdir}/tomoe/module/recognizer | |
240 | %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so | |
241 | %dir %{_datadir}/tomoe | |
242 | %dir %{_datadir}/tomoe/dict | |
243 | %dir %{_datadir}/tomoe/recognizer | |
5fba1661 | 244 | %{_datadir}/tomoe/recognizer/handwriting-*.xml |
ad34972e JR |
245 | %{_datadir}/tomoe/dict.dtd |
246 | ||
247 | %files devel | |
248 | %defattr(644,root,root,755) | |
249 | %attr(755,root,root) %{_libdir}/libtomoe.so | |
250 | %{_includedir}/tomoe | |
251 | %{_pkgconfigdir}/tomoe.pc | |
252 | %{_gtkdocdir}/tomoe | |
253 | ||
254 | %if %{with static_libs} | |
255 | %files static | |
256 | %defattr(644,root,root,755) | |
257 | %{_libdir}/libtomoe.a | |
258 | %endif | |
259 | ||
260 | %files hyperestraier | |
261 | %defattr(644,root,root,755) | |
262 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so | |
263 | ||
264 | %files mysql | |
265 | %defattr(644,root,root,755) | |
266 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so | |
267 | ||
268 | %files svn | |
269 | %defattr(644,root,root,755) | |
270 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so | |
271 | ||
ad34972e JR |
272 | %if %{with python} |
273 | %files -n python-tomoe | |
274 | %defattr(644,root,root,755) | |
ad34972e | 275 | %attr(755,root,root) %{py_sitedir}/tomoe.so |
f1dff604 JB |
276 | |
277 | %files -n python-tomoe-devel | |
278 | %defattr(644,root,root,755) | |
279 | %dir %{_datadir}/tomoe/python | |
280 | %{_datadir}/tomoe/python/tomoe.defs | |
c325a108 | 281 | %{_pkgconfigdir}/pytomoe.pc |
ad34972e | 282 | %endif |
19d2e237 JB |
283 | |
284 | %if %{with ruby} | |
285 | %files -n ruby-tomoe | |
286 | %defattr(644,root,root,755) | |
287 | %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb | |
22d315e6 JR |
288 | %attr(755,root,root) %{ruby_vendorarchdir}/tomoe.so |
289 | %{ruby_vendorlibdir}/tomoe.rb | |
19d2e237 JB |
290 | |
291 | %files -n ruby-tomoe-devel | |
292 | %defattr(644,root,root,755) | |
22d315e6 | 293 | %{ruby_vendorarchdir}/rbtomoe.h |
19d2e237 | 294 | %endif |