zinnia-vl.spec 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. Summary: Online handwriting recognition system with machine learning
  2. Summary(ja): 機械学習ベースのポータブルなオンライン手書き文字認識エンジン
  3. Name: zinnia
  4. Version: 0.07
  5. Release: 1%{?_dist_release}
  6. Group: System Environment/Libraries
  7. License: BSD
  8. URL: http://zinnia.sourceforge.net/
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. Source0: http://downloads.sourceforge.net/zinnia/%{name}-%{version}.tar.xz
  12. Source1: http://zinnia.svn.sourceforge.net/viewvc/zinnia/zinnia/tomoe2s.pl
  13. Source2: Makefile.tomoe
  14. Patch0: zinnia-0.05-bindings.patch
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  16. BuildRequires: libdb-devel
  17. BuildRequires: perl(ExtUtils::MakeMaker)
  18. BuildRequires: python-devel
  19. BuildRequires: tomoe
  20. %description
  21. Zinnia provides a simple, customizable, and portable dynamic OCR
  22. system for hand-written input, based on Support Vector Machines.
  23. Zinnia simply receives user pen strokes as coordinate data and outputs
  24. the best matching characters sorted by SVM confidence. To maintain
  25. portability, it has no rendering functionality. In addition to
  26. recognition, Zinnia provides a training module capable of creating
  27. highly efficient handwriting recognition models.
  28. This package contains the shared libraries.
  29. %description -l ja
  30. Zinnia は機械学習アルゴリズム SVM を用いたポータブルで汎用的なオンライン手書き文字認識エンジンです。
  31. Zinniaは組み込みの容易さと汎用性を高めるために、文字のレンダリング機能は持っていません。Zinniaは文字のストローク情報を座標の連続として受け取り、確からしい順にスコア付きでN文字の認識結果を返すだけに機能を限定しています。また、認識エンジンは完全に機械学習ベースであるために、文字のみならずユーザの任意のマウス・ペンストロークに対して任意の文字列をマッピングするような認識エンジンを小コスト作成することができます。
  32. %package devel
  33. Summary: Development files for %{name}
  34. Summary(ja): %{name} の開発用ファイル
  35. Group: Development/Libraries
  36. Requires: %{name} = %{version}-%{release}
  37. %description devel
  38. The %{name}-devel package contains libraries and header files for
  39. developing applications that use %{name}.
  40. %package utils
  41. Summary: Utils for the zinnia library
  42. Group: Applications/System
  43. Requires: %{name} = %{version}-%{release}
  44. %description utils
  45. The %{name}-utils package provides utilities for zinnia library that
  46. use %{name}.
  47. %package doc
  48. Summary: Documents for the zinnia library
  49. Group: Documentation
  50. Requires: %{name} = %{version}-%{release}
  51. #BuildArch: noarch
  52. %description doc
  53. The %{name}-doc package provide documents for zinnia library that
  54. use %{name}.
  55. %package perl
  56. Summary: Perl bindings for %{name}
  57. Group: Development/Libraries
  58. Requires: %{name} = %{version}-%{release}
  59. Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
  60. Provides: perl-zinnia = %{version}-%{release}
  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}
  89. %patch0 -p1 -b .bindings
  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. * Thu Jun 30 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.07-1
  168. - new upstream release.
  169. - dropped Patch1: fixed in upstream.
  170. * Mon Nov 10 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.06-5
  171. - rebuilt with perl 5.16.3
  172. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.06-4
  173. - rebuild with python-2.7.2
  174. * Sun Apr 3 2011 IWAI, Masaharu <iwai@alib.jp> 0.06-3vl6
  175. - build with perl 5.12.3
  176. * Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.06-2
  177. - rebuild with rpm-4.8.1 for pkg-config file
  178. * Tue Jun 8 2010 IWAI, Masaharu <iwai@alib.jp> 0.06-1
  179. - initial build for Vine Linux
  180. * Fri Jun 04 2010 Peng Wu <pwu@redhat.com> - 0.06-4
  181. - Add a patch(zinnia-0.06-fixes-ppc-float.patch),
  182. to fixes ppc/ppc64 zinnia tomoe model generating error.
  183. * Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.06-3
  184. - Mass rebuild with perl-5.12.0
  185. * Thu May 20 2010 Peng Wu <pwu@redhat.com> - 0.06-2
  186. - Auto generate zinnia tomoe model files,
  187. and includes all model files in zinnia-tomoe noarch sub-package.
  188. * Thu May 20 2010 Peng Wu <pwu@redhat.com> - 0.06-1
  189. - Update to version 0.06.
  190. * Wed Mar 10 2010 Liang Suilong <liangsuilong@gmail.com> - 0.05-4
  191. - Fix the bugs of SPEC file
  192. * Thu Mar 04 2010 Liang Suilong <liangsuilong@gmail.com> - 0.05-3
  193. - Fix something wrong of spec file
  194. * Tue Mar 02 2010 Liang Suilong <liangsuilong@gmail.com> - 0.05-2
  195. - Rename Subpackage for perl and python
  196. * Tue Feb 02 2010 Liang Suilong <liangsuilong@gmail.com> - 0.05-1
  197. - Initial Package