File yagf.spec of Package yagf
#
# spec file for package yagf
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: yagf
Version: 0.9.5
Release: 0
Summary: Graphical Front-end for Cuneiform and Tesseract
License: GPL-3.0-or-later
Group: Productivity/Graphics/Other
URL: http://symmetrica.net/cuneiform-linux/yagf-en.html
Source0: http://sourceforge.net/projects/yagf-ocr/files/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE yagf-0.9-desktop.patch lazy.kent@opensuse.org -- correct desktop file
Patch0: yagf-0.9-desktop.patch
BuildRequires: ImageMagick
BuildRequires: aspell
BuildRequires: aspell-devel
BuildRequires: cmake
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(QtCore)
BuildRequires: pkgconfig(QtGui)
Requires: djvulibre
Requires: ocr-engine
Requires: poppler-tools
Recommends: %{name}-lang
Recommends: cuneiform
Recommends: tesseract-ocr
Recommends: xsane
%description
YAGF is a graphical front-end for Cuneiform and Tesseract OCR tools.
With YAGF you can open already scanned image files or obtain new images
via XSane (scanning results are automatically passed to YAGF).
%lang_package
%prep
%setup -q
%patch0
chmod -x AUTHORS ChangeLog COPYING DESCRIPTION README TODO
%build
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_C_FLAGS="%{optflags}" \
-DCMAKE_CXX_FLAGS="%{optflags}"
make %{?_smp_mflags} VERBOSE=1
%install
pushd build
%make_install
popd
for size in 64x64 48x48 32x32 22x22 16x16 ; do
install -dm 0755 \
%{buildroot}%{_datadir}/icons/hicolor/${size}/apps/
convert -strip -resize ${size} %{name}.png \
%{buildroot}%{_datadir}/icons/hicolor/${size}/apps/%{name}.png
done
rm -f %{buildroot}%{_datadir}/pixmaps/%{name}.png
%find_lang %{name} --with-qt
%suse_update_desktop_file YAGF
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%license COPYING
%doc AUTHORS ChangeLog DESCRIPTION README TODO
%{_bindir}/%{name}
%{_datadir}/appdata/YAGF.appdata.xml
%dir %{_datadir}/%{name}/
%{_datadir}/applications/YAGF.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.png
%{_libdir}/yagf
%files lang -f %{name}.lang
%dir %{_datadir}/%{name}/translations/
%changelog