LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File yagf.spec of Package yagf (Project Publishing)

#
# spec file for package yagf
#
# Copyright (c) 2014 SUSE LINUX Products 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.3
Release:        0
License:        GPL-3.0+
Summary:        Graphical Front-end for Cuneiform and Tesseract
Url:            http://symmetrica.net/cuneiform-linux/yagf-en.html
Group:          Productivity/Graphics/Other
Source0:        http://symmetrica.net/cuneiform-linux/%{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:  update-desktop-files
BuildRequires:  pkgconfig(QtCore)
BuildRequires:  pkgconfig(QtGui)
Requires:       ocr-engine
Requires:       poppler-tools
Recommends:     %{name}-lang
Recommends:     cuneiform
Recommends:     tesseract
Recommends:     xsane
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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

%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
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING DESCRIPTION README
%{_bindir}/%{name}
%dir %{_datadir}/%{name}/
%{_datadir}/applications/YAGF.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.png
%{_libdir}/yagf

%files lang -f %{name}.lang
%defattr(-,root,root,-)
%dir %{_datadir}/%{name}/translations/

%changelog