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