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