]>
Commit | Line | Data |
---|---|---|
ad34972e JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python # build without python bindings | |
4 | %bcond_with ruby # build with ruby bindings | |
5 | %bcond_without static_libs # don't build static libraries | |
6 | # | |
7 | Summary: Handwritten input system for Japanese and Chinese | |
8 | Name: tomoe | |
9 | Version: 0.6.0 | |
ab01150c | 10 | Release: 5 |
ad34972e JR |
11 | License: LGPL v2+ |
12 | Group: Libraries | |
13 | Source0: http://downloads.sourceforge.net/tomoe/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: 0e51e88d097085e101bf722fc04808ed | |
15 | Patch0: %{name}-multiarch-conflict.patch | |
16 | Patch1: %{name}-bz502662.patch | |
17 | Patch2: %{name}-svn-libs.patch | |
d2cbbb84 | 18 | Patch3: %{name}-glib2.32.patch |
ad34972e JR |
19 | URL: http://tomoe.sourceforge.jp/ |
20 | BuildRequires: gettext | |
21 | BuildRequires: glib2-devel | |
22 | BuildRequires: gtk-doc | |
23 | BuildRequires: intltool | |
24 | BuildRequires: libtool | |
25 | BuildRequires: perl(XML::Parser) | |
26 | BuildRequires: python | |
27 | %if %{with python} | |
28 | BuildRequires: python-devel | |
29 | BuildRequires: python-pygobject-devel | |
30 | BuildRequires: python-pygtk-devel | |
31 | %endif | |
32 | %if %{with ruby} | |
33 | BuildRequires: ruby-gnome2-devel | |
34 | %endif | |
35 | BuildRequires: apr-util-devel | |
36 | BuildRequires: hyperestraier-devel | |
37 | BuildRequires: mysql-devel | |
38 | BuildRequires: pakchois-devel | |
39 | BuildRequires: subversion-devel | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
43 | A program which does Japanese handwriting recognition. | |
44 | ||
45 | %package devel | |
46 | Summary: Tomoe development files | |
47 | Group: Development/Libraries | |
48 | Requires: %{name} = %{version}-%{release} | |
49 | ||
50 | %description devel | |
51 | The tomoe-devel package includes the header files for the tomoe | |
52 | package. Install this package if you want to develop programs which | |
53 | use tomoe. | |
54 | ||
55 | %package static | |
56 | Summary: Tomoe static library | |
57 | Group: Development/Libraries | |
58 | Requires: %{name}-devel = %{version}-%{release} | |
59 | ||
60 | %description static | |
61 | Tomoe static library. | |
62 | ||
63 | %package hyperestraier | |
64 | Summary: Hyper Estraier dictionary support for tomoe | |
65 | Group: Development/Libraries | |
66 | Requires: %{name}-devel = %{version}-%{release} | |
67 | ||
68 | %description hyperestraier | |
69 | Hyper Estraier dictionary support for tomoe. | |
70 | ||
71 | %package mysql | |
72 | Summary: Mysql dictionary support for tomoe | |
73 | Group: Development/Libraries | |
74 | Requires: %{name}-devel = %{version}-%{release} | |
75 | ||
76 | %description mysql | |
77 | Mysql dictionary support for tomoe. | |
78 | ||
79 | %package svn | |
80 | Summary: Subversion dictionary support for tomoe | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | ||
84 | %description svn | |
85 | Subversion dictionary support for tomoe. | |
86 | ||
87 | %package -n python-tomoe | |
88 | Summary: Tomoe bindings for python | |
89 | Group: Development/Libraries | |
90 | Requires: %{name} = %{version}-%{release} | |
91 | ||
92 | %description -n python-tomoe | |
93 | Tomoe bindings for python. | |
94 | ||
95 | %package -n ruby-tomoe | |
96 | Summary: Tomoe bindings for ruby | |
97 | Group: Development/Libraries | |
98 | Requires: %{name} = %{version}-%{release} | |
99 | ||
100 | %description -n ruby-tomoe | |
101 | Tomoe bindings for ruby. | |
102 | ||
103 | %prep | |
104 | %setup -q | |
105 | %patch0 -p0 | |
106 | %patch1 -p0 | |
107 | %patch2 -p1 | |
d2cbbb84 | 108 | %patch3 -p1 |
ad34972e JR |
109 | |
110 | %{__sed} 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb | |
111 | ||
112 | %build | |
113 | %{__libtoolize} | |
114 | %{__aclocal} -I macros | |
115 | %{__autoconf} | |
116 | %{__automake} | |
117 | export CFLAGS="%{rpmcflags} -I/usr/include/apr-util" | |
118 | %configure \ | |
119 | %{!?with_static_libs:--disable-static} \ | |
120 | --with-svn-lib=%{_libdir} \ | |
121 | --enable-gtk-doc \ | |
122 | --with-html-dir=%{_gtkdocdir} | |
123 | ||
124 | %{__make} | |
125 | ||
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
ab01150c JR |
128 | install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict |
129 | ||
ad34972e JR |
130 | %{__make} install \ |
131 | DESTDIR=$RPM_BUILD_ROOT | |
132 | ||
133 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
134 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la} | |
135 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la} | |
136 | ||
137 | %find_lang %{name} | |
138 | ||
139 | %clean | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
142 | %post -p /sbin/ldconfig | |
143 | %postun -p /sbin/ldconfig | |
144 | ||
145 | %files -f %{name}.lang | |
146 | %defattr(644,root,root,755) | |
147 | %doc AUTHORS NEWS README TODO data/kanjidic*.html | |
148 | %dir %{_sysconfdir}/tomoe | |
149 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomoe/config | |
150 | %attr(755,root,root) %{_libdir}/libtomoe.so.*.*.* | |
151 | %attr(755,root,root) %ghost %{_libdir}/libtomoe.so.[0-9] | |
152 | %dir %{_libdir}/tomoe | |
153 | %dir %{_libdir}/tomoe/module | |
154 | %dir %{_libdir}/tomoe/module/dict | |
155 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/unihan.so | |
156 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/xml.so | |
157 | %dir %{_libdir}/tomoe/module/recognizer | |
158 | %attr(755,root,root) %{_libdir}/tomoe/module/recognizer/simple.so | |
159 | %dir %{_datadir}/tomoe | |
160 | %dir %{_datadir}/tomoe/dict | |
161 | %dir %{_datadir}/tomoe/recognizer | |
162 | %{_datadir}/tomoe/recognizer/*.xml | |
163 | %{_datadir}/tomoe/dict.dtd | |
164 | ||
165 | %files devel | |
166 | %defattr(644,root,root,755) | |
167 | %attr(755,root,root) %{_libdir}/libtomoe.so | |
168 | %{_includedir}/tomoe | |
169 | %{_pkgconfigdir}/tomoe.pc | |
170 | %{_gtkdocdir}/tomoe | |
171 | ||
172 | %if %{with static_libs} | |
173 | %files static | |
174 | %defattr(644,root,root,755) | |
175 | %{_libdir}/libtomoe.a | |
176 | %endif | |
177 | ||
178 | %files hyperestraier | |
179 | %defattr(644,root,root,755) | |
180 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/est.so | |
181 | ||
182 | %files mysql | |
183 | %defattr(644,root,root,755) | |
184 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/mysql.so | |
185 | ||
186 | %files svn | |
187 | %defattr(644,root,root,755) | |
188 | %attr(755,root,root) %{_libdir}/tomoe/module/dict/svn.so | |
189 | ||
190 | %if %{with ruby} | |
191 | %files -n ruby-tomoe | |
192 | %defattr(644,root,root,755) | |
193 | %{ruby_archdir} | |
194 | %{_libdir}/ruby/site_ruby/1.8/tomoe.rb | |
195 | %{_libdir}/ruby/site_ruby/1.8/*-linux/* | |
196 | %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb | |
197 | %endif | |
198 | ||
199 | %if %{with python} | |
200 | %files -n python-tomoe | |
201 | %defattr(644,root,root,755) | |
202 | %{_pkgconfigdir}/pytomoe.pc | |
203 | %attr(755,root,root) %{py_sitedir}/tomoe.so | |
204 | %{_datadir}/tomoe/python | |
205 | %endif |