]> git.pld-linux.org Git - packages/zinnia.git/blob - zinnia.spec
45197aecf2ccee3a591000ef6d5d8d5f53135574
[packages/zinnia.git] / zinnia.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # don't build static libraries
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_with     python3 # CPython 3.x module
6 #
7 Summary:        Online handwriting recognition system with machine learning
8 Summary(pl.UTF-8):      System rozpoznawania pisma ręcznego z uczeniem maszynowym
9 Name:           zinnia
10 Version:        0.06
11 Release:        13
12 License:        BSD
13 Group:          Libraries
14 Source0:        http://downloads.sourceforge.net/zinnia/%{name}-%{version}.tar.gz
15 # Source0-md5:  5ed6213e2b879465783087a0cf6d5fa0
16 # http://zinnia.svn.sourceforge.net/viewvc/zinnia/zinnia/tomoe2s.pl
17 Source1:        tomoe2s.pl
18 Source2:        Makefile.tomoe
19 Patch0:         %{name}-gcc.patch
20 Patch1:         zinnia-fixes-gcc6-compile.patch
21 URL:            http://zinnia.sourceforge.net/
22 BuildRequires:  db-devel
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  perl-ExtUtils-MakeMaker
25 BuildRequires:  perl-devel >= 1:5.8.0
26 BuildRequires:  python-devel
27 BuildRequires:  rpm-perlprov >= 4.1-13
28 # uses tomoe XMLs
29 BuildRequires:  tomoe
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Zinnia provides a simple, customizable, and portable dynamic OCR
34 system for hand-written input, based on Support Vector Machines.
35
36 Zinnia simply receives user pen strokes as coordinate data and outputs
37 the best matching characters sorted by SVM confidence. To maintain
38 portability, it has no rendering functionality. In addition to
39 recognition, Zinnia provides a training module capable of creating
40 highly efficient handwriting recognition models.
41
42 This package contains the shared library.
43
44 %description -l pl.UTF-8
45 Zinnia zapewnia prosty, konfigurowalny i przenośny system dynamicznego
46 OCR do pisma ręcznego, oparty na SVM (Support Vector Machines).
47
48 Zinnia odbiera uderzenia pióra jako dane o współrzędnych i przekazuje
49 na wyjściu najlepiej pasujące znaki posortowane według ufności SVM.
50 Aby zachować przenośność, nie ma funkcji renderowania. Poza
51 rozpoznawaniem Zinnia udostępnia moduł trenujący, potrafiący tworzyć
52 bardzo wydajne modele rozpoznawania pisma ręcznego.
53
54 Ten pakiet zawiera bibliotekę współdzieloną.
55
56 %package devel
57 Summary:        Header files for Zinnia library
58 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Zinnia
59 Group:          Development/Libraries
60 Requires:       %{name} = %{version}-%{release}
61
62 %description devel
63 This package contains the header files for developing applications
64 that use Zinnia.
65
66 %description devel -l pl.UTF-8
67 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
68 wykorzystujących bibliotekę Zinnia.
69
70 %package static
71 Summary:        Static Zinnia library
72 Summary(pl.UTF-8):      Statyczna biblioteka Zinnia
73 Group:          Development/Libraries
74 Requires:       %{name}-devel = %{version}-%{release}
75
76 %description static
77 Static Zinnia library.
78
79 %description static -l pl.UTF-8
80 Statyczna biblioteka Zinnia.
81
82 %package utils
83 Summary:        Utils for the Zinnia library
84 Summary(pl.UTF-8):      Programy narzędziowe do biblioteki Zinnia
85 Group:          Applications/System
86 Requires:       %{name} = %{version}-%{release}
87
88 %description utils
89 This package provides utilities for Zinnia library.
90
91 %description utils -l pl.UTF-8
92 Ten pakiet zawiera programy narzędziowe do biblioteki Zinnia.
93
94 %package doc
95 Summary:        Documents for the Zinnia library
96 Summary(pl.UTF-8):      Dokumentacja do biblioteki Zinnia
97 Group:          Documentation
98
99 %description doc
100 This package provide documents for Zinnia library.
101
102 %description doc -l pl.UTF-8
103 Ten pakiet zawiera dokumentację do biblioteki Zinnia.
104
105 %package -n perl-zinnia
106 Summary:        Perl bindings for Zinnia
107 Summary(pl.UTF-8):      Wiązania Perla do biblioteki Zinnia
108 Group:          Development/Languages/Perl
109 Requires:       %{name} = %{version}-%{release}
110
111 %description -n perl-zinnia
112 This package contains Perl bindings for Zinnia.
113
114 %description -n perl-zinnia -l pl.UTF-8
115 Ten pakiet zawiera wiązania Perla do biblioteki Zinnia.
116
117 %package -n python-zinnia
118 Summary:        Python bindings for zinnia
119 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki Zinnia
120 Group:          Development/Languages/Python
121 Requires:       %{name} = %{version}-%{release}
122
123 %description -n python-zinnia
124 This package contains Python bindings for Zinnia.
125
126 %description -n python-zinnia -l pl.UTF-8
127 Ten pakiet zawiera wiązania Pythona do biblioteki Zinnia.
128
129 %package -n python3-zinnia
130 Summary:        Python 3 bindings for zinnia
131 Summary(pl.UTF-8):      Wiązania Pythona 3 do biblioteki Zinnia
132 Group:          Development/Languages/Python
133 Requires:       %{name} = %{version}-%{release}
134
135 %description -n python3-zinnia
136 This package contains Python 3 bindings for Zinnia.
137
138 %description -n python3-zinnia -l pl.UTF-8
139 Ten pakiet zawiera wiązania Pythona 3 do biblioteki Zinnia.
140
141 %package tomoe
142 Summary:        Tomoe model files for Zinnia
143 Summary(pl.UTF-8):      Pliki modelu Tomoe dla biblioteki Zinnia
144 Group:          Libraries
145 Requires:       %{name} = %{version}-%{release}
146
147 %description tomoe
148 This package contains Tomoe model files for Zinnia.
149
150 %description tomoe -l pl.UTF-8
151 Ten pakiet zawiera pliki modelu Tomoe dla biblioteki Zinnia.
152
153 %prep
154 %setup -q
155 %patch0 -p1
156 %patch1 -p1
157
158 %{__rm} python/zinnia.pyc
159
160 cp %{SOURCE1} .
161 cp %{SOURCE2} .
162
163 iconv -f latin1 -t utf8 doc/zinnia.css > doc/zinnia.css.utf8
164 mv -f doc/zinnia.css.utf8 doc/zinnia.css
165
166 %build
167 %configure
168
169 %{__make} \
170         CFLAGS="%{rpmcflags}" \
171         CXXFLAGS="%{rpmcxxflags}" \
172         LDFLAGS="%{rpmldflags}"
173
174 %{__make} -f Makefile.tomoe build
175
176 cd perl
177 %{__perl} Makefile.PL \
178         INSTALLDIRS=vendor
179
180 %{__make} \
181         CC="%{__cc}"
182         OPTIMIZE="%{rpmcflags}"
183 cd ..
184
185 cd python
186 CC="%{__cc}" \
187 CFLAGS="-I.. %{rpmcflags}" \
188 LDFLAGS="-L../.libs %{rpmldflags}" \
189 %if %{with python2}
190 %py_build
191 %endif
192
193 %if %{with python3}
194 %py3_build
195 %endif
196
197
198 %install
199 rm -rf $RPM_BUILD_ROOT
200
201 %{__make} install \
202         DESTDIR=$RPM_BUILD_ROOT
203
204 %{__make} -f Makefile.tomoe install \
205         DESTDIR=$RPM_BUILD_ROOT
206
207 %{__make} -C perl pure_install \
208         DESTDIR=$RPM_BUILD_ROOT
209
210 cd python
211 %if %{with python2}
212 %py_install
213
214 %py_postclean
215 %endif
216
217 %if %{with python3}
218 %py3_install
219 %endif
220
221
222 # obsoleted by pkg-config
223 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
224
225 %clean
226 rm -rf $RPM_BUILD_ROOT
227
228 %post   -p /sbin/ldconfig
229 %postun -p /sbin/ldconfig
230
231 %files
232 %defattr(644,root,root,755)
233 %doc AUTHORS COPYING README
234 %attr(755,root,root) %{_libdir}/libzinnia.so.*.*.*
235 %attr(755,root,root) %ghost %{_libdir}/libzinnia.so.0
236
237 %files devel
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/libzinnia.so
240 %{_includedir}/zinnia
241 %{_includedir}/zinnia.h
242 %{_pkgconfigdir}/zinnia.pc
243
244 %if %{with static_libs}
245 %files static
246 %defattr(644,root,root,755)
247 %{_libdir}/libzinnia.a
248 %endif
249
250 %files utils
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_bindir}/zinnia
253 %attr(755,root,root) %{_bindir}/zinnia_convert
254 %attr(755,root,root) %{_bindir}/zinnia_learn
255
256 %files doc
257 %defattr(644,root,root,755)
258 %doc doc/*
259
260 %files -n perl-zinnia
261 %defattr(644,root,root,755)
262 %{perl_vendorarch}/zinnia.pm
263 %dir %{perl_vendorarch}/auto/zinnia
264 %attr(755,root,root) %{perl_vendorarch}/auto/zinnia/zinnia.so
265
266 %if %{with python2}
267 %files -n python-zinnia
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{py_sitedir}/_zinnia.so
270 %{py_sitedir}/zinnia.py[co]
271 %{py_sitedir}/zinnia_python-0.0.0-py*.egg-info
272 %endif
273
274 %if %{with python3}
275 %files -n python3-zinnia
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{py3_sitedir}/_zinnia.so
278 %{py3_sitedir}/zinnia.py[co]
279 %{py3_sitedir}/zinnia_python-0.0.0-py*.egg-info
280 %endif
281
282 %files tomoe
283 %defattr(644,root,root,755)
284 %dir %{_datadir}/zinnia
285 %dir %{_datadir}/zinnia/model
286 %dir %{_datadir}/zinnia/model/tomoe
287 %{_datadir}/zinnia/model/tomoe/handwriting-ja.model
288 %{_datadir}/zinnia/model/tomoe/handwriting-zh_CN.model
This page took 0.106758 seconds and 2 git commands to generate.