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