]> git.pld-linux.org Git - packages/tomoe.git/blob - tomoe.spec
c2d933ba6924ee6a6bfe3ad589542d022e35d4e8
[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:        22
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-tools
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 %{__gtkdocize}
188 %{__libtoolize}
189 %{__aclocal} -I macros
190 %{__autoconf}
191 %{__automake}
192 export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
193 %configure \
194         UNZIP=/usr/bin/unzip \
195         %{!?with_static_libs:--disable-static} \
196         %{?with_ruby:--with-ruby-bindingdir=%{ruby_vendorarchdir}} \
197         %{?with_ruby:--with-ruby-libdir=%{ruby_vendorlibdir}} \
198         --enable-gtk-doc \
199         --with-html-dir=%{_gtkdocdir} \
200         --with-svn-lib=%{_libdir}
201
202 %{__make}
203
204 %install
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict
207
208 %{__make} install \
209         DESTDIR=$RPM_BUILD_ROOT
210
211 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
212 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la}
213 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la}
214 %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/tomoe.{a,la}}
215
216 %if %{without ruby}
217 %{__rm} $RPM_BUILD_ROOT%{_datadir}/tomoe/xml2est.rb
218 %endif
219
220 %find_lang %{name}
221
222 %clean
223 rm -rf $RPM_BUILD_ROOT
224
225 %post   -p /sbin/ldconfig
226 %postun -p /sbin/ldconfig
227
228 %files -f %{name}.lang
229 %defattr(644,root,root,755)
230 %doc AUTHORS NEWS README TODO data/kanjidic*.html
231 %dir %{_sysconfdir}/tomoe
232 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config
233 %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.*
234 %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.0
235 %dir %{_libdir}/tomoe
236 %dir %{_libdir}/tomoe/module
237 %dir %{_libdir}/tomoe/module/dict
238 %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so
239 %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so
240 %dir %{_libdir}/tomoe/module/recognizer
241 %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so
242 %dir %{_datadir}/tomoe
243 %dir %{_datadir}/tomoe/dict
244 %dir %{_datadir}/tomoe/recognizer
245 %{_datadir}/tomoe/recognizer/handwriting-*.xml
246 %{_datadir}/tomoe/dict.dtd
247
248 %files devel
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/libtomoe.so
251 %{_includedir}/tomoe
252 %{_pkgconfigdir}/tomoe.pc
253 %{_gtkdocdir}/tomoe
254
255 %if %{with static_libs}
256 %files static
257 %defattr(644,root,root,755)
258 %{_libdir}/libtomoe.a
259 %endif
260
261 %files hyperestraier
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so
264
265 %files mysql
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so
268
269 %files svn
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so
272
273 %if %{with python}
274 %files -n python-tomoe
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{py_sitedir}/tomoe.so
277
278 %files -n python-tomoe-devel
279 %defattr(644,root,root,755)
280 %dir %{_datadir}/tomoe/python
281 %{_datadir}/tomoe/python/tomoe.defs
282 %{_pkgconfigdir}/pytomoe.pc
283 %endif
284
285 %if %{with ruby}
286 %files -n ruby-tomoe
287 %defattr(644,root,root,755)
288 %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb
289 %attr(755,root,root) %{ruby_vendorarchdir}/tomoe.so
290 %{ruby_vendorlibdir}/tomoe.rb
291
292 %files -n ruby-tomoe-devel
293 %defattr(644,root,root,755)
294 %{ruby_vendorarchdir}/rbtomoe.h
295 %endif
This page took 0.059162 seconds and 2 git commands to generate.