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