Blob Blame History Raw
Name:           yagf
Version:        0.8.6
Release:        6%{?dist}
Summary:        Graphical front-end for cuneiform

Group:          Applications/Multimedia
License:        GPLv3+
URL:            http://symmetrica.net/cuneiform-linux/yagf-en.html
Source0:        http://symmetrica.net/cuneiform-linux/%{name}-%{version}-Source.tar.gz

# fix .desktop file
Patch:          yagf-0.8.6-Source-desktop.patch

BuildRequires:  cmake
BuildRequires:  desktop-file-utils
BuildRequires:  aspell-devel
BuildRequires:  qt4-devel
BuildRequires:  dos2unix
Requires:       cuneiform

%description
YAGF is a graphical interface for the cuneiform text
recognition program. With YAGF you can scan images via
XSane, perform images preprocessing and recognize
texts using cuneiform from a single command center.
YAGF also makes it easy to scan and recognize
several images sequentially.

%prep
%setup -qn %{name}-%{version}-Source
%patch -p1 -b .desktop

# fix permisions and line brake for debug package
chmod -x src/mainform.cpp src/mainform.h src/main.cpp
dos2unix src/mainform.cpp src/mainform.h

%build
# CMakeLists.txt constructed in such a way that
# translations can't be installed from %%{_target_platform}
%{cmake} .

make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}

desktop-file-validate %{buildroot}%{_datadir}/applications/YAGF.desktop

%find_lang %{name} --with-qt

%post
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
update-desktop-database &> /dev/null || :
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%files -f %{name}.lang
%doc AUTHORS ChangeLog COPYING DESCRIPTION README
%{_bindir}/%{name}
%{_libdir}/%{name}
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%{_datadir}/applications/YAGF.desktop
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/pixmaps/%{name}.png

%changelog
* Mon Aug 15 2011 Dmitrij S. Kryzhevich <krege@land.ru> 0.8.6-6
- Update patch for desktop file.
- Some spelling and readability.

* Wed Jul 13 2011 Dmitrij S. Kryzhevich <krege@land.ru> 0.8.6-5
- Own /usr/share/yagf/translations.

* Tue Jul 12 2011 Dmitrij S. Kryzhevich <krege@land.ru> 0.8.6-4
- find_lang magic.
- spec clean up.

* Tue Jul 12 2011 Dmitrij S. Kryzhevich <krege@land.ru> 0.8.6-3
- Move previouse fix to %%prep section.

* Fri Jul 08 2011 Dmitrij S. Kryzhevich <krege@land.ru> 0.8.6-2
- Fix permesions for debug package.

* Tue Apr 05 2011 Dmitrij S. Kryzhevich <krege@land.ru> 0.8.6-1
- First try.