source: projects/specs/trunk/z/zinnia/zinnia-vl.spec @ 9077

Revision 9077, 7.5 KB checked in by inagaki, 9 years ago (diff)

2014-11-11 Ryoichi INAGAKI <ryo1@…>

  • tomoe: updated
  • zinnia: rebuilt


Line 
1Summary:        Online handwriting recognition system with machine learning
2Summary:        機械学習ベースのポータブルなオンライン手書き文字認識エンジン
3Name:           zinnia
4Version:        0.06
5Release:        5%{?_dist_release}
6Group:          System Environment/Libraries
7License:        BSD
8URL:            http://zinnia.sourceforge.net/
9Source0:        http://downloads.sourceforge.net/zinnia/%{name}-%{version}.tar.gz
10Source1:        http://zinnia.svn.sourceforge.net/viewvc/zinnia/zinnia/tomoe2s.pl
11Source2:        Makefile.tomoe
12Patch0:         zinnia-0.05-bindings.patch
13Patch1:         zinnia-0.06-fixes-ppc-float.patch
14
15BuildRoot:      %{_tmppath}/%{name}-%{version}-root
16BuildRequires:  libdb-devel
17BuildRequires:  perl(ExtUtils::MakeMaker)
18BuildRequires:  python-devel
19BuildRequires:  tomoe
20
21%description
22Zinnia provides a simple, customizable, and portable dynamic OCR
23system for hand-written input, based on Support Vector Machines.
24
25Zinnia simply receives user pen strokes as coordinate data and outputs
26the best matching characters sorted by SVM confidence. To maintain
27portability, it has no rendering functionality. In addition to
28recognition, Zinnia provides a training module capable of creating
29highly efficient handwriting recognition models.
30
31This package contains the shared libraries.
32
33%description -l ja
34Zinnia は機械学習アルゴリズム SVM を用いたポータブルで汎用的なオンライン手書き文字認識エンジンです。
35Zinniaは組み込みの容易さと汎用性を高めるために、文字のレンダリング機能は持っていません。Zinniaは文字のストローク情報を座標の連続として受け取り、確からしい順にスコア付きでN文字の認識結果を返すだけに機能を限定しています。また、認識エンジンは完全に機械学習ベースであるために、文字のみならずユーザの任意のマウス・ペンストロークに対して任意の文字列をマッピングするような認識エンジンを小コスト作成することができます。
36
37%package        devel
38Summary:        Development files for %{name}
39Summary(ja):    %{name} の開発用ファイル
40Group:          Development/Libraries
41Requires:       %{name} = %{version}-%{release}
42
43%description    devel
44The %{name}-devel package contains libraries and header files for
45developing applications that use %{name}.
46
47%package        utils
48Summary:        Utils for the zinnia library
49Group:          Applications/System
50Requires:       %{name} = %{version}-%{release}
51
52%description    utils
53The %{name}-utils package provides utilities for zinnia library that
54use %{name}.
55
56%package        doc
57Summary:        Documents for the zinnia library
58Group:          Documentation
59Requires:       %{name} = %{version}-%{release}
60#BuildArch:     noarch
61
62%description    doc
63The %{name}-doc package provide documents for zinnia library that
64use %{name}.
65
66%package        perl
67Summary:        Perl bindings for %{name}
68Group:          Development/Libraries
69Requires:       %{name} = %{version}-%{release}
70Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
71Provides:       perl-zinnia = %{version}-%{release}
72
73%description    perl
74This package contains perl bindings for %{name}.
75
76%package        python
77Summary:        Python bindings for %{name}
78Group:          Development/Libraries
79Requires:       %{name} = %{version}-%{release}
80Provides:       tegaki-recognition-engine
81
82%description    python
83This package contains python bindings for %{name}.
84
85%package        tomoe
86Summary:        Tomoe Ja model file for %{name}
87Group:          System Environment/Libraries
88Requires:       %{name} = %{version}-%{release}
89Provides:       %{name}-model
90Provides:       %{name}-tomoe-ja
91#BuildArch:     noarch
92
93%description    tomoe
94This package contains tomoe Ja model files for %{name}.
95
96%package        tomoe-zh_CN
97Summary:        Tomoe model zh_CN file for %{name}
98Group:          System Environment/Libraries
99Requires:       %{name} = %{version}-%{release}
100Provides:       %{name}-model
101#BuildArch:     noarch
102
103%description    tomoe-zh_CN
104This package contains tomoe zh_CN model files for %{name}.
105
106%prep
107%setup -q -n %{name}-%{version}
108%patch0 -p1 -b .bindings
109%patch1 -p1 -b .ppc
110find . -type f -name ChangeLog -size 0c -exec rm -f {} ';'
111find . -type f -name "*.pyc" -exec rm -f {} ';'
112cp %{SOURCE1} .
113cp %{SOURCE2} .
114pushd doc
115iconv -f latin1 -t utf8 zinnia.css > zinnia.css.bak
116mv -f zinnia.css.bak zinnia.css
117popd
118
119%build
120%configure --disable-static
121sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
122sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
123make %{?_smp_mflags}
124make -f Makefile.tomoe build
125
126pushd perl
127perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
128make %{?_smp_mflags}
129popd
130
131pushd python
132CFLAGS="$RPM_OPT_FLAGS -I../" LDFLAGS="-L../.libs" python setup.py build
133popd
134
135%install
136rm -rf $RPM_BUILD_ROOT
137make install DESTDIR=$RPM_BUILD_ROOT
138make -f Makefile.tomoe install DESTDIR=$RPM_BUILD_ROOT
139
140#install -d -m 0755 -p $RPM_BUILD_ROOT%{_docdir}/%{name}
141#cp -pfr doc $RPM_BUILD_ROOT%{_docdir}/%{name}
142
143pushd perl
144make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
145popd
146
147pushd python
148python setup.py install --root $RPM_BUILD_ROOT
149pushd
150
151#remove something unnecessary
152find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
153find $RPM_BUILD_ROOT -type f -name "*.bs" -size 0c -exec rm -f {} ';'
154find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
155
156#change the privilege of some files
157chmod 0755 $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{name}/%{name}.so
158
159
160%clean
161rm -rf $RPM_BUILD_ROOT
162
163
164%post -p /sbin/ldconfig
165
166%postun -p /sbin/ldconfig
167
168
169%files
170%defattr(-,root,root,-)
171%doc README COPYING
172%{_libdir}/*.so.*
173
174%files devel
175%defattr(-,root,root,-)
176%{_includedir}/*
177%{_libdir}/lib%{name}.so
178
179%{_libdir}/pkgconfig/%{name}.pc
180
181%files utils
182%defattr(-,root,root,-)
183%{_bindir}/zinnia
184%{_bindir}/zinnia_convert
185%{_bindir}/zinnia_learn
186
187%files doc
188%defattr(-,root,root,-)
189%doc doc/*
190
191%files  perl
192%defattr(-,root,root,-)
193%{perl_vendorarch}/auto/%{name}/
194%{perl_vendorarch}/%{name}.pm
195
196%files  python
197%defattr(-,root,root,-)
198%{python_sitearch}/_%{name}.so
199%{python_sitearch}/%{name}*
200
201%files tomoe
202%defattr(-,root,root,-)
203%dir %{_datadir}/zinnia/model/tomoe/
204%{_datadir}/zinnia/model/tomoe/handwriting-ja.model
205
206%files tomoe-zh_CN
207%defattr(-,root,root,-)
208%dir %{_datadir}/zinnia/model/tomoe/
209%{_datadir}/zinnia/model/tomoe/handwriting-zh_CN.model
210
211
212%changelog
213* Mon Nov 10 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.06-5
214- rebuilt with perl 5.16.3
215
216* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.06-4
217- rebuild with python-2.7.2
218
219* Sun Apr  3 2011 IWAI, Masaharu <iwai@alib.jp> 0.06-3vl6
220- build with perl 5.12.3
221
222* Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.06-2
223- rebuild with rpm-4.8.1 for pkg-config file
224
225* Tue Jun  8 2010 IWAI, Masaharu <iwai@alib.jp> 0.06-1
226- initial build for Vine Linux
227
228* Fri Jun 04 2010  Peng Wu <pwu@redhat.com> - 0.06-4
229- Add a patch(zinnia-0.06-fixes-ppc-float.patch),
230  to fixes ppc/ppc64 zinnia tomoe model generating error.
231
232* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.06-3
233- Mass rebuild with perl-5.12.0
234
235* Thu May 20 2010  Peng Wu <pwu@redhat.com> - 0.06-2
236- Auto generate zinnia tomoe model files,
237  and includes all model files in zinnia-tomoe noarch sub-package.
238
239* Thu May 20 2010  Peng Wu <pwu@redhat.com> - 0.06-1
240- Update to version 0.06.
241
242* Wed Mar 10 2010 Liang Suilong <liangsuilong@gmail.com> - 0.05-4
243- Fix the bugs of SPEC file
244
245* Fri Mar 04 2010 Liang Suilong <liangsuilong@gmail.com> - 0.05-3
246- Fix something wrong of spec file
247
248* Wed Mar 02 2010 Liang Suilong <liangsuilong@gmail.com> - 0.05-2
249- Rename Subpackage for perl and python
250
251* Tue Feb 02 2010 Liang Suilong <liangsuilong@gmail.com> - 0.05-1
252- Initial Package
Note: See TracBrowser for help on using the repository browser.