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