zinnia-vl.spec 7.2 KB

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