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