rpms/zinnia/F-13 Makefile.tomoe, NONE, 1.1 tomoe2s.pl, NONE, 1.1 .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 zinnia.spec, 1.1, 1.2
Peng Wu
pwu at fedoraproject.org
Thu May 20 08:47:45 UTC 2010
- Previous message: rpms/zinnia/devel Makefile.tomoe, NONE, 1.1 tomoe2s.pl, NONE, 1.1 .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 zinnia.spec, 1.1, 1.2
- Next message: rpms/xorg-x11-proto-devel/F-12 sources, 1.63, 1.64 xorg-x11-proto-devel.spec, 1.113, 1.114
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pwu
Update of /cvs/pkgs/rpms/zinnia/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv6717
Modified Files:
.cvsignore sources zinnia.spec
Added Files:
Makefile.tomoe tomoe2s.pl
Log Message:
* Thu May 20 2010 Peng Wu <pwu at redhat.com> - 0.06-2
- Auto generate zinnia tomoe model files,
and includes all model files in zinnia-tomoe noarch sub-package.
* Thu May 20 2010 Peng Wu <pwu at redhat.com> - 0.06-1
- Update to version 0.06.
--- NEW FILE Makefile.tomoe ---
TOMOE_MODEL_PATH = /usr/share/tomoe/recognizer/
build: handwriting-ja.model handwriting-zh_CN.model tomoe2s.pl
handwriting-ja.model: $(TOMOE_MODEL_PATH)/handwriting-ja.xml
perl tomoe2s.pl $(TOMOE_MODEL_PATH)/handwriting-ja.xml > handwriting-ja.s
LD_LIBRARY_PATH=.libs/ ./zinnia_learn handwriting-ja.s handwriting-ja.model
LD_LIBRARY_PATH=.libs/ ./zinnia_convert handwriting-ja.model.txt handwriting-ja.model
handwriting-zh_CN.model: $(TOMOE_MODEL_PATH)/handwriting-zh_CN.xml
perl tomoe2s.pl $(TOMOE_MODEL_PATH)/handwriting-zh_CN.xml > handwriting-zh_CN.s
LD_LIBRARY_PATH=.libs/ ./zinnia_learn handwriting-zh_CN.s handwriting-zh_CN.model
LD_LIBRARY_PATH=.libs/ ./zinnia_convert handwriting-zh_CN.model.txt handwriting-zh_CN.model
install: build
install -d $(DESTDIR)/usr/share/zinnia//model/tomoe
install -m 0644 -p handwriting-ja.model handwriting-zh_CN.model $(DESTDIR)/usr/share/zinnia//model/tomoe
--- NEW FILE tomoe2s.pl ---
#!/usr/bin/perl
use utf8;
my $value;
my $stroke;
my $strokes;
while (<>) {
if (/<character>/) {
while (<>) {
if (/<utf8>([^<]+)<\/utf8>/) {
$value = $1;
$value =~ s/^&#x//;
$value = pack("U", hex($value));
utf8::encode($value);
$stroke = "";
$strokes = "";
} elsif (/<point x=\"(\d+)\" y=\"(\d+)\"/) {
my $x = $1;
my $y = $2;
# print "$x $y\n";
$stroke .= "($x $y)";
} elsif (/<\/stroke>/) {
$strokes .= "($stroke)";
$stroke = "";
} elsif (/<\/character>/) {
if ($value !~ /[\(\)]/) {
print "(character (value $value)(width 1000)(height 1000)(strokes $strokes))\n";
}
$value = "";
last;
}
}
}
}
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/zinnia/F-13/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- .cvsignore 11 Mar 2010 01:44:20 -0000 1.2
+++ .cvsignore 20 May 2010 08:47:45 -0000 1.3
@@ -1 +1 @@
-zinnia-0.05.tar.gz
+zinnia-0.06.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/zinnia/F-13/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sources 11 Mar 2010 01:44:20 -0000 1.2
+++ sources 20 May 2010 08:47:45 -0000 1.3
@@ -1 +1 @@
-78462a619ad63772683666e3eefc092e zinnia-0.05.tar.gz
+5ed6213e2b879465783087a0cf6d5fa0 zinnia-0.06.tar.gz
Index: zinnia.spec
===================================================================
RCS file: /cvs/pkgs/rpms/zinnia/F-13/zinnia.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- zinnia.spec 11 Mar 2010 01:44:20 -0000 1.1
+++ zinnia.spec 20 May 2010 08:47:45 -0000 1.2
@@ -4,18 +4,21 @@
%endif
Name: zinnia
-Version: 0.05
-Release: 4%{?dist}
+Version: 0.06
+Release: 2%{?dist}
Summary: Online handwriting recognition system with machine learning
Group: System Environment/Libraries
License: BSD
URL: http://zinnia.sourceforge.net/
Source0: http://downloads.sourceforge.net/zinnia/%{name}-%{version}.tar.gz
+Source1: http://zinnia.svn.sourceforge.net/viewvc/zinnia/zinnia/tomoe2s.pl
+Source2: Makefile.tomoe
Patch0: zinnia-0.05-bindings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: db4-devel, python2-devel
BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: tomoe
%description
Zinnia provides a simple, customizable, and portable dynamic OCR
@@ -75,11 +78,22 @@ Requires: %{name} = %{version}-%{release
%description python
This package contains python bindings for %{name}.
+%package tomoe
+Summary: Tomoe model file for %{name}
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description tomoe
+This package contains tomoe model files for %{name}.
+
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .bindings
find . -type f -name ChangeLog -size 0c -exec rm -f {} ';'
find . -type f -name "*.pyc" -exec rm -f {} ';'
+cp %{SOURCE1} .
+cp %{SOURCE2} .
pushd doc
iconv -f latin1 -t utf8 zinnia.css > zinnia.css.bak
mv -f zinnia.css.bak zinnia.css
@@ -90,6 +104,7 @@ popd
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
+make -f Makefile.tomoe build
pushd perl
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
@@ -103,6 +118,7 @@ popd
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
+make -f Makefile.tomoe install DESTDIR=$RPM_BUILD_ROOT
#install -d -m 0755 -p $RPM_BUILD_ROOT%{_docdir}/%{name}
#cp -pfr doc $RPM_BUILD_ROOT%{_docdir}/%{name}
@@ -166,8 +182,20 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitearch}/_%{name}.so
%{python_sitearch}/%{name}*
+%files tomoe
+%defattr(-,root,root,-)
+%dir %{_datadir}/zinnia/model/tomoe/
+%{_datadir}/zinnia/model/tomoe/handwriting-ja.model
+%{_datadir}/zinnia/model/tomoe/handwriting-zh_CN.model
%changelog
+* Thu May 20 2010 Peng Wu <pwu at redhat.com> - 0.06-2
+- Auto generate zinnia tomoe model files,
+ and includes all model files in zinnia-tomoe noarch sub-package.
+
+* Thu May 20 2010 Peng Wu <pwu at redhat.com> - 0.06-1
+- Update to version 0.06.
+
* Wed Mar 10 2010 Liang Suilong <liangsuilong at gmail.com> - 0.05-4
- Fix the bugs of SPEC file
- Previous message: rpms/zinnia/devel Makefile.tomoe, NONE, 1.1 tomoe2s.pl, NONE, 1.1 .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 zinnia.spec, 1.1, 1.2
- Next message: rpms/xorg-x11-proto-devel/F-12 sources, 1.63, 1.64 xorg-x11-proto-devel.spec, 1.113, 1.114
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list