zinnia-vl.spec 7.5 KB

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