Blob Blame History Raw
Name:           yagf
Version:        0.9.1
Release:        3%{?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}.tar.gz

# fix .desktop file
Patch:          yagf-0.9.1-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}
%patch -p1 -b .desktop

# fix line brake for debug package
dos2unix src/mainform.cpp src/mainform.h

# fix permisions
chmod 644 src/mainform.cpp src/mainform.h src/main.cpp

%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
* Thu Apr 24 2012 Dmitrij S. Kryzhevich <krege@land.ru> 0.9.1-3
- Patch modify.

* Thu Apr 24 2012 Dmitrij S. Kryzhevich <krege@land.ru> 0.9.1-2
- Fix setup tag.

* Thu Apr 24 2012 Dmitrij S. Kryzhevich <krege@land.ru> 0.9.1-1
- Update to 0.9.1.

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Dec 22 2011 Dmitrij S. Kryzhevich <krege@land.ru> 0.8.9-1
- Update to 0.8.9.

* Mon Sep 05 2011 Dmitrij S. Kryzhevich <krege@land.ru> 0.8.7-1
- Update to 0.8.7.
- Permissions for files including into debug package are OK now.

* 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.