[gimagereader] Update to 3.0

Sandro Mani smani at fedoraproject.org
Mon Dec 15 15:50:05 UTC 2014


commit b886dfdbc51e80b01cb117df4e732cfb38be86e5
Author: Sandro Mani <manisandro at gmail.com>
Date:   Mon Dec 15 16:49:04 2014 +0100

    Update to 3.0

 .gitignore                      |    1 +
 gimagereader.spec               |  129 +++++++++++++++++++++++++++++++--------
 gimagereader_no-sane-exit.patch |   12 ----
 sources                         |    2 +-
 4 files changed, 105 insertions(+), 39 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0b36755..03e0288 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /gimagereader-2.91.tar.xz
 /gimagereader-2.92.tar.xz
 /gimagereader-2.93.tar.xz
+/gimagereader-3.0.tar.xz
diff --git a/gimagereader.spec b/gimagereader.spec
index 400f366..25e4be1 100644
--- a/gimagereader.spec
+++ b/gimagereader.spec
@@ -1,15 +1,13 @@
 Name:          gimagereader
-Version:       2.93
-Release:       5%{?dist}
-License:       GPLv3+
-Group:         Applications/Productivity
-Summary:       OCR application
-URL:           http://sourceforge.net/projects/gimagereader/
-Source0:       http://sourceforge.net/projects/gimagereader/files/%{version}/%{name}-%{version}.tar.xz
+Version:       3.0
+Release:       1%{?dist}
+Summary:       A front-end to tesseract-ocr
 
-# Workaround for rbhz#1065695
-Patch0:        gimagereader_no-sane-exit.patch
+License:       GPLv3+
+URL:           https://github.com/manisandro/gimagereader
+Source0:       https://github.com/manisandro/gimagereader/releases/download/v%{version}/%{name}-%{version}.tar.xz
 
+BuildRequires: cmake
 BuildRequires: gtkmm30-devel
 BuildRequires: gtkspellmm30-devel
 BuildRequires: cairomm-devel
@@ -18,12 +16,47 @@ BuildRequires: tesseract-devel
 BuildRequires: sane-backends-devel
 BuildRequires: intltool
 BuildRequires: desktop-file-utils
-BuildRequires: appdata-tools
+BuildRequires: libappstream-glib
+BuildRequires: qt4-devel
+BuildRequires: qtspell-qt4-devel
+BuildRequires: poppler-qt-devel
 
 Requires:      hicolor-icon-theme
 
 %description
-gImageReader is a simple Gtk front-end to tesseract. Features include:
+gImageReader is a simple front-end to tesseract. Features include:
+ - Automatic page layout detection
+ - User can manually define and adjust recognition regions
+ - Import images from disk, scanning devices, clipboard and screenshots
+ - Supports multipage PDF documents
+ - Recognized text displayed directly next to the image
+ - Editing of output text, including search/replace and removing line breaks
+ - Spellchecking for output text (if corresponding dictionary installed)
+
+
+%package gtk
+Summary:       A Gtk+ front-end to tesseract-ocr
+Requires:      %{name}-common = %{version}-%{release}
+Obsoletes:     %{name} < 2.94-1
+
+%description gtk
+gImageReader is a simple front-end to tesseract. Features include:
+ - Automatic page layout detection
+ - User can manually define and adjust recognition regions
+ - Import images from disk, scanning devices, clipboard and screenshots
+ - Supports multipage PDF documents
+ - Recognized text displayed directly next to the image
+ - Editing of output text, including search/replace and removing line breaks
+ - Spellchecking for output text (if corresponding dictionary installed)
+This package contains the Gtk+ front-end.
+
+
+%package qt
+Summary:       A Qt front-end to tesseract-ocr
+Requires:      %{name}-common = %{version}-%{release}
+
+%description qt
+gImageReader is a simple front-end to tesseract. Features include:
  - Automatic page layout detection
  - User can manually define and adjust recognition regions
  - Import images from disk, scanning devices, clipboard and screenshots
@@ -31,33 +64,52 @@ gImageReader is a simple Gtk front-end to tesseract. Features include:
  - Recognized text displayed directly next to the image
  - Editing of output text, including search/replace and removing line breaks
  - Spellchecking for output text (if corresponding dictionary installed)
+This package contains the Qt front-end.
+
+%package common
+Summary:       Common files for %{name}
+BuildArch:     noarch
+
+%description common
+Common files for %{name}.
 
 
 %prep
 %setup -q
-%patch0 -p1
 
 
 %build
-%configure --disable-versioncheck
+mkdir build_gtk
+(
+cd build_gtk
+%cmake -DINTERFACE_TYPE=gtk -DENABLE_VERSIONCHECK=0 -DMANUAL_DIR="%{_defaultdocdir}/%{name}-common" ..
 make %{?_smp_mflags}
+)
+mkdir build_qt
+(
+cd build_qt
+%cmake -DINTERFACE_TYPE=qt4 -DENABLE_VERSIONCHECK=0 -DMANUAL_DIR="%{_defaultdocdir}/%{name}-common" ..
+make %{?_smp_mflags}
+)
 
 
 %install
-%make_install
-
-%{_bindir}/desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
-%{_bindir}/appdata-validate %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml || :
+%make_install -C build_gtk
+%make_install -C build_qt
+%{_bindir}/desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}-gtk.desktop
+%{_bindir}/desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}-qt4.desktop
+%{_bindir}/appstream-util validate %{buildroot}%{_datadir}/appdata/%{name}-gtk.appdata.xml || :
+%{_bindir}/appstream-util validate %{buildroot}%{_datadir}/appdata/%{name}-qt4.appdata.xml || :
 
 %find_lang %{name}
 
 
-%post
+%post gtk
 /usr/bin/update-desktop-database &> /dev/null || :
 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 
-%postun
+%postun gtk
 /usr/bin/update-desktop-database &> /dev/null || :
 if [ $1 -eq 0 ] ; then
     /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
@@ -65,24 +117,49 @@ if [ $1 -eq 0 ] ; then
     /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
-
-%posttrans
+%posttrans gtk
 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 
 
-%files -f %{name}.lang
+%post qt
+/usr/bin/update-desktop-database &> /dev/null || :
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%postun qt
+/usr/bin/update-desktop-database &> /dev/null || :
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans qt
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%files common -f %{name}.lang
 %doc AUTHORS ChangeLog COPYING NEWS README TODO
-%{_bindir}/%{name}
-%{_datadir}/%{name}
-%{_datadir}/appdata/%{name}.appdata.xml
-%{_datadir}/applications/%{name}.desktop
 %{_datadir}/icons/hicolor/48x48/apps/%{name}.png
+%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
 %{_datadir}/icons/hicolor/256x256/apps/%{name}.png
+%doc %{_defaultdocdir}/%{name}-common/manual.html
+
+%files gtk
+%{_bindir}/%{name}-gtk
+%{_datadir}/appdata/%{name}-gtk.appdata.xml
+%{_datadir}/applications/%{name}-gtk.desktop
 %{_datadir}/glib-2.0/schemas/org.gnome.%{name}.gschema.xml
 
+%files qt
+%{_bindir}/%{name}-qt4
+%{_datadir}/appdata/%{name}-qt4.appdata.xml
+%{_datadir}/applications/%{name}-qt4.desktop
 
 %changelog
+* Mon Dec 15 2014 Sandro Mani <manisandro at gmail.com> - 3.0-1
+- Update to 3.0.
+
 * Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.93-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/sources b/sources
index c7498a3..4b4460a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1ede9c29867f3be4e725f711b983fbeb  gimagereader-2.93.tar.xz
+b20e672643c94a02a2d1568f0f2bba3a  gimagereader-3.0.tar.xz


More information about the scm-commits mailing list