[packages/ocrfeeder] - updated to 0.8.2 (python3 based now) - added missing patch (missing file taken from git)

qboosh qboosh at pld-linux.org
Sun Mar 8 13:33:19 CET 2020


commit db646fffb1170c8c0d2452841dfb5b54c96b06d7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Mar 8 13:34:16 2020 +0100

    - updated to 0.8.2 (python3 based now)
    - added missing patch (missing file taken from git)

 ocrfeeder-missing.patch | 135 ++++++++++++++++++++++++++++++++++++++++++++++++
 ocrfeeder.spec          |  60 ++++++++++++---------
 2 files changed, 171 insertions(+), 24 deletions(-)
---
diff --git a/ocrfeeder.spec b/ocrfeeder.spec
index eba74ff..225a681 100644
--- a/ocrfeeder.spec
+++ b/ocrfeeder.spec
@@ -1,41 +1,47 @@
 Summary:	OCRFeeder - document layout analysis and optical character recognition system
 Summary(pl.UTF-8):	OCRFeeder - system analizy układu dokumentu i optycznego rozpoznawania znaków
 Name:		ocrfeeder
-Version:	0.8.1
+Version:	0.8.2
 Release:	1
 License:	GPL v3+
 Group:		Applications/Graphics
 Source0:	http://ftp.gnome.org/pub/GNOME/sources/ocrfeeder/0.8/%{name}-%{version}.tar.xz
-# Source0-md5:	defa1fc1034e637f48fbc37a4809296a
-URL:		https://wiki.gnome.org/OCRFeeder
+# Source0-md5:	d308158ecaa1d88c6850d96b23430743
+Patch0:		%{name}-missing.patch
+URL:		https://wiki.gnome.org/Apps/OCRFeeder
+BuildRequires:	autoconf >= 2.63
+BuildRequires:	automake >= 1:1.11
 BuildRequires:	gettext-tools
-BuildRequires:	gnome-doc-utils
+# for AM_GLIB_GNU_GETTEXT
+BuildRequires:	glib2-devel >= 2.0
 # Gtk, GooCanvas gobject bindings
 BuildRequires:	goocanvas2
 # Gtk gobject binding
 BuildRequires:	gtk+3
 BuildRequires:	intltool >= 0.35.0
-# sane, reportlab
-BuildRequires:	python-PIL
-BuildRequires:	python-ReportLab
-BuildRequires:	python-pyenchant
-# note: checks for pygobject, but uses pygobject3
-BuildRequires:	python-pygobject
-BuildRequires:	python-pysane
-BuildRequires:	python-modules >= 1:2.5
+BuildRequires:	python3 >= 1:3.5
+BuildRequires:	python3-ReportLab
+BuildRequires:	python3-odfpy
+BuildRequires:	python3-pillow
+BuildRequires:	python3-pyenchant
+BuildRequires:	python3-pygobject3
+BuildRequires:	python3-sane
+BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.219
+BuildRequires:	rpmbuild(macros) >= 1.507
 BuildRequires:	sed >= 4.0
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	xz
+BuildRequires:	yelp-tools
 Requires:	goocanvas2
 Requires:	gtk+3
-Requires:	python-PIL
-Requires:	python-ReportLab
-Requires:	python-modules >= 1:2.5
-Requires:	python-pyenchant
-Requires:	python-pygobject3
-Requires:	python-pysane
+Requires:	python3-ReportLab
+Requires:	python3-modules >= 1:3.5
+Requires:	python3-odfpy
+Requires:	python3-pillow
+Requires:	python3-pyenchant
+Requires:	python3-pygobject3
+Requires:	python3-sane
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -71,10 +77,16 @@ informatyki Joaquima Rocha.
 
 %prep
 %setup -q
+%patch0 -p1
 
-%{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' bin/ocrfeeder.in bin/ocrfeeder-cli.in
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' bin/ocrfeeder.in bin/ocrfeeder-cli.in
 
 %build
+# rebuild am to get PLD version of python.m4
+%{__intltoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__automake}
 %configure \
 	--disable-silent-rules
 %{__make}
@@ -85,8 +97,6 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%py_postclean
-
 %find_lang %{name} --with-gnome
 
 %clean
@@ -97,8 +107,10 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS ChangeLog NEWS README TRANSLATORS
 %attr(755,root,root) %{_bindir}/ocrfeeder
 %attr(755,root,root) %{_bindir}/ocrfeeder-cli
-%{py_sitescriptdir}/ocrfeeder
+%{py3_sitescriptdir}/ocrfeeder
 %{_datadir}/ocrfeeder
-%{_desktopdir}/ocrfeeder.desktop
+%{_datadir}/metainfo/org.gnome.OCRFeeder.appdata.xml
+%{_desktopdir}/org.gnome.OCRFeeder.desktop
+%{_iconsdir}/hicolor/scalable/apps/org.gnome.OCRFeeder.svg
 %{_mandir}/man1/ocrfeeder.1*
 %{_mandir}/man1/ocrfeeder-cli.1*
diff --git a/ocrfeeder-missing.patch b/ocrfeeder-missing.patch
new file mode 100644
index 0000000..59915a9
--- /dev/null
+++ b/ocrfeeder-missing.patch
@@ -0,0 +1,135 @@
+--- ocrfeeder-0.8.2/resources/org.gnome.OCRFeeder.appdata.xml.in.orig	1970-01-01 01:00:00.000000000 +0100
++++ ocrfeeder-0.8.2/resources/org.gnome.OCRFeeder.appdata.xml.in	2020-03-08 13:00:19.392232124 +0100
+@@ -0,0 +1,132 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component type="desktop">
++  <id>org.gnome.OCRFeeder</id>
++  <launchable type="desktop-id">org.gnome.OCRFeeder.desktop</launchable>
++  <_name>OCRFeeder</_name>
++  <_summary>The complete OCR suite</_summary>
++  <metadata_license>CC0-1.0</metadata_license>
++  <project_license>GPL-3.0+</project_license>
++  <developer_name>Joaquim Rocha</developer_name>
++  <description>
++    <_p>OCRFeeder is a document layout analysis and optical character recognition system.</_p>
++    <_p>Given the images it will automatically outline its contents, distinguish between what's graphics and text and perform OCR over the latter. It generates multiple formats being its main one ODT.</_p>
++    <_p>It features a complete GTK graphical user interface that allows the users to correct any unrecognized characters, defined or correct bounding boxes, set paragraph styles, clean the input images, import PDFs, save and load the project, export everything to multiple formats, etc.</_p>
++  </description>
++  <screenshots>
++    <screenshot type="default">
++      <_caption>Content Areas</_caption>
++      <image>https://wiki.gnome.org/Apps/OCRFeeder?action=AttachFile&do=get&target=ocrfeeder.jpeg</image>
++    </screenshot>
++    <screenshot>
++      <_caption>Unpaper Image Processor</_caption>
++      <image>https://wiki.gnome.org/Apps/OCRFeeder?action=AttachFile&do=get&target=ocrfeeder_unpaper.jpeg</image>
++    </screenshot>
++    <screenshot>
++      <_caption>Check spelling</_caption>
++      <image>https://wiki.gnome.org/Apps/OCRFeeder?action=AttachFile&do=get&target=ocrfeeder_spellchecker.png</image>
++    </screenshot>
++  </screenshots>
++  <url type="bugtracker">https://gitlab.gnome.org/GNOME/ocrfeeder/issues</url>
++  <url type="homepage">https://wiki.gnome.org/Apps/OCRFeeder</url>
++  <update_contact>me at joaquimrocha.com</update_contact>
++  <translation type="gettext">ocrfeeder</translation>
++  <provides>
++    <binary>ocrfeeder</binary>
++  </provides>
++  <content_rating type="oars-1.0" />
++  <releases>
++    <release version="0.8.2" date="2020-01-26">
++      <description>
++        <_p>
++          Improvements:
++        </_p>
++        <ul>
++          <_li>Python 3 is now used, making the unicode issues go away for good</_li>
++          <_li>The main window is now bigger</_li>
++          <_li>The image clip is now expandible</_li>
++          <_li>The manpages have been updated with the missing options</_li>
++        </ul>
++        <_p>
++          Bug Fixes:
++        </_p>
++        <ul>
++          <_li>Fix icons in the boxes' editor text align buttons</_li>
++          <_li>Install the application icon in the right place</_li>
++          <_li>Many issues in the scanner dialog have been fixed (scanner options, UI problems, etc.)</_li>
++        </ul>
++      </description>
++    </release>
++    <release version="0.8.1" date="2014-12-22">
++      <description>
++        <_p>
++          Improvements:
++        </_p>
++        <ul>
++          <_li>The Preferences dialog is now smaller (the big contents are wrapped in a scrolled window)</_li>
++          <_li>All dialogs are now centered to the main window</_li>
++          <_li>Use XDG user's configuration directory instead of .ocrfeeder</_li>
++        </ul>
++        <_p>
++          Bug Fixes:
++        </_p>
++        <ul>
++          <_li>Fix Gtk thread related problems</_li>
++          <_li>Fix unicode issues when saving a project and exporting a document</_li>
++          <_li>Fix issue when exporting a picture in a document from a loaded project</_li>
++          <_li>Fix ODT exportation button's icon</_li>
++        </ul>
++      </description>
++    </release>
++    <release version="0.8.0" date="2014-08-04">
++      <description>
++        <_p>
++          New Features:
++        </_p>
++        <ul>
++          <_li>Add support for multiple image TIFFs</_li>
++        </ul>
++        <_p>
++          Improvements:
++        </_p>
++        <ul>
++          <_li>Port the application to GObject Introspection</_li>
++          <_li>Scan with 300 DPI and in color mode</_li>
++          <_li>Use the last visited directory when adding a new image</_li>
++          <_li>Warn when no OCR engines are found on startup or when performing the recognition</_li>
++          <_li>Update the box editor's OCR controls sensitiveness according to the existence of OCR engines</_li>
++        </ul>
++        <_p>
++          Bug Fixes:
++        </_p>
++        <ul>
++          <_li>Fix PIL importation</_li>
++          <_li>Fix error when exporting a PDF with empty text areas</_li>
++          <_li>Fix PDF output options in ocrfeeder-cli</_li>
++          <_li>Fix getting engine name in ocrfeeder-cli</_li>
++          <_li>Fix the use of newer versions of Unpaper</_li>
++          <_li>Fix text in the pages icon view</_li>
++          <_li>Fix reordering pages in the icon view</_li>
++          <_li>Fix issues when no locale is set</_li>
++          <_li>Fix loading project with more than one page</_li>
++          <_li>Fix updating the OCR engines in the BoxEditor</_li>
++        </ul>
++        <_p>
++          New and Updated Translations:
++        </_p>
++        <ul>
++          <_li>Marek Černocký [cz]</_li>
++          <_li>Daniel Mustieles [es]</_li>
++          <_li>Fran Diéguez [gl]</_li>
++          <_li>Dimitris Spingos [el]</_li>
++          <_li>Aharon Don [he]</_li>
++          <_li>Attila Hammer, Gabor Kelemen [hu]</_li>
++          <_li>Rafael Ferreira [pt_BR]</_li>
++          <_li>Martin Srebotnjak [sl]</_li>
++          <_li>Мирослав Николић [sr]</_li>
++          <_li>Piotr Drąg [uk]</_li>
++          <_li>Wylmer Wang [zh_CN]</_li>
++        </ul>
++      </description>
++    </release>
++  </releases>
++</component>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ocrfeeder.git/commitdiff/db646fffb1170c8c0d2452841dfb5b54c96b06d7



More information about the pld-cvs-commit mailing list