%define url_ver %{lua: ver = rpm.expand("%{version}"); majmin, count1 = string.gsub(ver, "^([0123456789]+%.[0123456789]+).*", "%1", 1); if count1 == 0 then print(ver); return; end; maj, count2 = string.gsub(majmin, "^([0123456789]+).*", "%1", 1); if count2 == 0 then print(majmin) elseif tonumber(majmin) < 40 then print(majmin) else print(maj) end} Name: ocrfeeder Version: 0.8.5 Release: %mkrel 1 Summary: Optical Character Recognition program License: GPLv3+ Group: Graphical desktop/GNOME URL: https://wiki.gnome.org/OCRFeeder Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz Patch2: ocrfeeder-0.8.5-PyGIWarning_ensure-that-the-right-version-gets-loaded.patch BuildArch: noarch BuildRequires: gnome-doc-utils >= 0.3.2 BuildRequires: intltool >= 0.35.0 BuildRequires: itstool BuildRequires: pkgconfig(goocanvas-2.0) BuildRequires: pkgconfig(gtkspell3-3.0) BuildRequires: python3dist(odfpy) BuildRequires: python3dist(pyenchant) BuildRequires: python3dist(pillow) BuildRequires: python3dist(pygobject) BuildRequires: python3dist(python-sane) BuildRequires: python3dist(reportlab) Requires: python3dist(lxml) Requires: python3dist(odfpy) Requires: python3dist(pillow) Requires: python3dist(pygobject) Requires: python3dist(python-sane) Requires: python3dist(reportlab) Requires: python3dist(pyenchant) Requires: ghostscript Requires: unpaper >= 0.3 Recommends: tesseract %description OCRFeeder is a complete Optical Character Recognition and Document Analysis and Recognition program. %prep %setup -q %autopatch -p1 %build %configure --disable-silent-rules %make_build %install %make_install %find_lang %{name} --with-gnome %files -f %{name}.lang %doc NEWS README AUTHORS %{_bindir}/%{name} %{_bindir}/%{name}-cli %{_datadir}/%{name}/ %{_datadir}/applications/org.gnome.OCRFeeder.desktop %{_metainfodir}/org.gnome.OCRFeeder.appdata.xml %{_iconsdir}/hicolor/scalable/*/org.gnome.OCRFeeder.svg %{_mandir}/man1/%{name}*1.* %{python3_sitelib}/%{name}/ %changelog * Sun Oct 23 2022 ghibo <ghibo> 0.8.5-1.mga9 + Revision: 1898771 - Update to release 0.8.5. - Rework Patch2. * Wed Apr 06 2022 umeabot <umeabot> 0.8.3-4.mga9 + Revision: 1846084 - Mageia 9 Mass Rebuild * Mon Feb 28 2022 mrambo3501 <mrambo3501> 0.8.3-3.mga9 + Revision: 1786507 - rebuild for python-3.10 * Sat Mar 20 2021 daviddavid <daviddavid> 0.8.3-2.mga9 + Revision: 1705353 - rebuild for python 3.9 * Mon Mar 09 2020 daviddavid <daviddavid> 0.8.3-1.mga8 + Revision: 1555020 - new version: 0.8.3 - port to python3 + umeabot <umeabot> - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%configure2_5x * Thu Sep 20 2018 umeabot <umeabot> 0.8.1-5.mga7 + Revision: 1281320 - Mageia 7 Mass Rebuild * Thu Jun 07 2018 daviddavid <daviddavid> 0.8.1-4.mga7 + Revision: 1235194 - add missing dependencies on python-gi and python-lxml (mga#23109) - remove unneeded GTK+2 dependencies - add patch to fix some PyGIWarning + kekepower <kekepower> - Use new make macros * Fri Feb 19 2016 umeabot <umeabot> 0.8.1-3.mga6 + Revision: 969571 - Mageia 6 Mass Rebuild * Sat Aug 29 2015 daviddavid <daviddavid> 0.8.1-2.mga6 + Revision: 870899 - update BuildRequires and Requires on python-sane * as pysane is no more provides by python-pillow-sane * Wed Dec 24 2014 ovitters <ovitters> 0.8.1-1.mga5 + Revision: 805419 - new version 0.8.1 * Wed Oct 15 2014 umeabot <umeabot> 0.8-2.mga5 + Revision: 741895 - Second Mageia 5 Mass Rebuild * Mon Sep 29 2014 wally <wally> 0.8-1.mga5 + Revision: 731764 - new version 0.8 - drop upstreamed patches - add patch to disable runtime gi dep check on build time + umeabot <umeabot> - Mageia 5 Mass Rebuild + tv <tv> - s/uggests:/Recommends:/ + pterjan <pterjan> - Rebuild for new Python * Sat May 10 2014 daviddavid <daviddavid> 0.7.11-5.mga5 + Revision: 621807 - rediff Patch0 to use %%apply_patches macro - add Patch1 to fix PIL imports modules since Pillow package (mga#13313) * https://bugzilla.gnome.org/show_bug.cgi?id=712671 - fix missing icons in iconsdir repertory for desktop menu entry - replace python-imaging by python-pillow on BRs and Rs - prefer use pkgconfig on BRs - prefer use pythonegg on BRs and Rs * Sat Nov 09 2013 ovitters <ovitters> 0.7.11-4.mga4 + Revision: 550193 - fix url * Sun Nov 03 2013 fwang <fwang> 0.7.11-3.mga4 + Revision: 549248 - add more requires + umeabot <umeabot> - Mageia 4 Mass Rebuild * Fri Mar 01 2013 obgr_seneca <obgr_seneca> 0.7.11-2.mga3 + Revision: 400923 - Add missing br for python-enchant + ovitters <ovitters> - new version 0.7.11 * Sun Jan 13 2013 umeabot <umeabot> 0.7.10-2.mga3 + Revision: 361777 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Thu Oct 11 2012 ovitters <ovitters> 0.7.10-1.mga3 + Revision: 304655 - new version 0.7.10 * Wed Apr 11 2012 ovitters <ovitters> 0.7.9-1.mga3 + Revision: 230281 - new version 0.7.9 - new version 0.7.8 * Sat Dec 10 2011 wally <wally> 0.7.7-1.mga2 + Revision: 180315 - new version 0.7.7 - buildrequire and require python-reportlab - handle gnome help files with find_lang macro - use configure2_5x and makeinstall_std macros + fwang <fwang> - new version 0.7.6 + mikala <mikala> - Fix file list * Sat Jul 16 2011 mikala <mikala> 0.7.5-1.mga2 + Revision: 124761 - Add python-enchant as BuildRequires + julien <julien> - suggest tesseract instead of ocrad - add missing buildrequires - better name for patch0 - correct license tag - Created package structure for ocrfeeder.