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