]> git.pld-linux.org Git - packages/tomoe.git/blob - tomoe.spec
8531515e1464847e1b22e660330c9e1251cc7b3b
[packages/tomoe.git] / tomoe.spec
1 #
2 # Conditional build:
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
6 #
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
9 Name:           tomoe
10 Version:        0.6.0
11 Release:        9
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
19 Patch3:         %{name}-glib2.32.patch
20 Patch4:         %{name}-ruby.patch
21 Patch5:         %{name}-format.patch
22 URL:            http://tomoe.sourceforge.jp/
23 BuildRequires:  apr-util-devel
24 BuildRequires:  autoconf >= 2.57
25 BuildRequires:  automake
26 BuildRequires:  gettext-devel
27 BuildRequires:  glib2-devel >= 1:2.4.0
28 BuildRequires:  gtk-doc >= 1.4
29 BuildRequires:  hyperestraier-devel
30 BuildRequires:  intltool >= 0.35.0
31 BuildRequires:  libtool
32 BuildRequires:  libxslt-progs
33 BuildRequires:  mysql-devel
34 BuildRequires:  pakchois-devel
35 BuildRequires:  perl-XML-Parser
36 BuildRequires:  pkgconfig
37 BuildRequires:  python
38 BuildRequires:  subversion-devel
39 %if %{with python}
40 BuildRequires:  python-devel
41 BuildRequires:  python-pygobject-devel
42 BuildRequires:  python-pygtk-devel
43 %endif
44 %if %{with ruby}
45 BuildRequires:  ruby-glib2-devel
46 %endif
47 Requires:       glib2 >= 1:2.4.0
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 A program which does Japanese and Chinese handwriting recognition.
52
53 %description -l pl.UTF-8
54 Program rozpoznający japońskie i chińskie pismo ręczne.
55
56 %package devel
57 Summary:        Header files for tomoe library
58 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki tomoe
59 Group:          Development/Libraries
60 Requires:       %{name} = %{version}-%{release}
61 Requires:       glib2-devel >= 1:2.4.0
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
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
72 %package static
73 Summary:        Tomoe static library
74 Summary(pl.UTF-8):      Statyczna biblioteka tomoe
75 Group:          Development/Libraries
76 Requires:       %{name}-devel = %{version}-%{release}
77
78 %description static
79 Tomoe static library.
80
81 %description static -l pl.UTF-8
82 Statyczna biblioteka tomoe.
83
84 %package hyperestraier
85 Summary:        Hyper Estraier dictionary support for tomoe
86 Summary(pl.UTF-8):      Obsługa słowników Hyper Estraiera dla tomoe
87 Group:          Libraries
88 Requires:       %{name} = %{version}-%{release}
89
90 %description hyperestraier
91 Hyper Estraier dictionary support for tomoe.
92
93 %description hyperestraier -l pl.UTF-8
94 Obsługa słowników Hyper Estraiera dla tomoe.
95
96 %package mysql
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}
101
102 %description mysql
103 MySQL dictionary support for tomoe.
104
105 %description mysql -l pl.UTF-8
106 Obsługa słowników MySQL dla tomoe.
107
108 %package svn
109 Summary:        Subversion dictionary support for tomoe
110 Summary(pl.UTF-8):      Obsługa słowników Subversion dla tomoe
111 Group:          Libraries
112 Requires:       %{name} = %{version}-%{release}
113
114 %description svn
115 Subversion dictionary support for tomoe.
116
117 %description svn -l pl.UTF-8
118 Obsługa słowników Subversion dla tomoe.
119
120 %package -n python-tomoe
121 Summary:        Tomoe bindings for Python
122 Summary(pl.UTF-8):      Wiązania tomoe dla Pythona
123 Group:          Libraries/Python
124 Requires:       %{name} = %{version}-%{release}
125
126 %description -n python-tomoe
127 Tomoe bindings for Python.
128
129 %description -n python-tomoe -l pl.UTF-8
130 Wiązania tomoe dla Pythona.
131
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
146 %package -n ruby-tomoe
147 Summary:        Tomoe bindings for Ruby
148 Summary(pl.UTF-8):      Wiązania tomoe dla języka Ruby
149 Group:          Development/Languages
150 Requires:       %{name} = %{version}-%{release}
151 Requires:       ruby-glib2
152
153 %description -n ruby-tomoe
154 Tomoe bindings for Ruby.
155
156 %description -n ruby-tomoe -l pl.UTF-8
157 Wiązania tomoe dla języka Ruby.
158
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
173 %prep
174 %setup -q
175 %patch0 -p0
176 %patch1 -p0
177 %patch2 -p1
178 %patch3 -p1
179 %patch4 -p1
180 %patch5 -p1
181
182 %{__sed} -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb
183
184 %build
185 %{__libtoolize}
186 %{__aclocal} -I macros
187 %{__autoconf}
188 %{__automake}
189 export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
190 %configure \
191         UNZIP=/usr/bin/unzip \
192         %{!?with_static_libs:--disable-static} \
193         --enable-gtk-doc \
194         --with-html-dir=%{_gtkdocdir} \
195         --with-svn-lib=%{_libdir}
196
197 %{__make}
198
199 %install
200 rm -rf $RPM_BUILD_ROOT
201 install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict
202
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}
209 %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/tomoe.{a,la}}
210
211 %if %{without ruby}
212 %{__rm} $RPM_BUILD_ROOT%{_datadir}/tomoe/xml2est.rb
213 %endif
214
215 %find_lang %{name}
216
217 %clean
218 rm -rf $RPM_BUILD_ROOT
219
220 %post   -p /sbin/ldconfig
221 %postun -p /sbin/ldconfig
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.*.*.*
229 %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.0
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
240 %{_datadir}/tomoe/recognizer/handwriting-*.xml
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
268 %if %{with python}
269 %files -n python-tomoe
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{py_sitedir}/tomoe.so
272
273 %files -n python-tomoe-devel
274 %defattr(644,root,root,755)
275 %dir %{_datadir}/tomoe/python
276 %{_datadir}/tomoe/python/tomoe.defs
277 %{_pkgconfigdir}/pytomoe.pc
278 %endif
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
This page took 0.135976 seconds and 2 git commands to generate.