File babiloo.spec of Package babiloo

# spec file for package babiloo
# Copyright (c) 2012 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

Name:           babiloo
Version:        2.0.11
Release:        0
Summary:        Dictionary viewer with multi-languages support
License:        GPL-3.0+
Group:          Productivity/Office/Dictionary
Source1:	%{name}
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  python-qt4-devel
Requires:       python-qt4
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

Babiloo supports dictionaries in SDictionary and StarDict format
and HTML displaying for the supported dictionaries.
Babiloo allows the download of more dictionaries from Internet.
 * Support for many languages / fonts rendering.
 * Don't convert dictionaries, use originals.
 * Phonetic sounds.
 * Advanced search.
 * Collaborative dictionaries.
GUI written for python-qt4

%setup -q

make -C qt/ clean
make -C qt/ all

LANGUAGES=`find locale/ -maxdepth 1 -mindepth 1 -type d -not -name \.svn -printf "%f "`
for lang in ${LANGUAGES}; do \
localedir=%{buildroot}/%{_datadir}/locale/${lang}/LC_MESSAGES; \
install -d -m 755 ${localedir}; \
msgfmt --directory=locale ${lang}/LC_MESSAGES/%{name}.po --output-file=${localedir}/%{name}.mo; \
install -d -m 755 %{buildroot}/%{_datadir}/%{name}
%__cp -a core dicts images qt %{buildroot}/%{_datadir}/%{name}
install -m 755 -t %{buildroot}/%{_datadir}/%{name} *.py
%find_lang %{name} %{?no_lang_C}
install -D -m 644 %{name}.desktop %{buildroot}/%{_datadir}/applications/%{name}.desktop 
install -D -m 644 images/%{name}.xpm %{buildroot}/%{_datadir}/pixmaps/%{name}.xpm
%suse_update_desktop_file -G "Application to view dictionaries" babiloo Dictionary
install -D -m 0755 %{SOURCE1} %{buildroot}/%{_bindir}/%{name}
%__gzip babiloo.1
install -D -m 644 babiloo.1.gz %{buildroot}/%{_mandir}/man1/%{name}.1.gz
%__chmod a-x ChangeLog
%py_compile %{buildroot}%{_datadir}/%{name}
%py_compile -O %{buildroot}%{_datadir}/%{name}
%fdupes %{buildroot}%{_datadir}

rm -rf %{buildroot}




%files lang -f %{name}.lang