File goldendict.spec of Package goldendict

# spec file for package goldendict
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2008-2009 Buschmann <>
# 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

%define gitversion 1291478773

Name:           goldendict
Summary:        Dictionary Lookup Program
License:        GPL-3.0+
Group:          Productivity/Office/Dictionary
Version:        1.0.1
Release:        0
Source0:        %{name}-%{gitversion}
#Date of goldendict-1290012314.tar: 2010-11-20
#The newest .tar.gz ball can be downloaded from:
Patch0:         install-paths.patch
Patch1:         goldendict-gcc47.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Requires:       hunspell >= 1.2.4
Requires:       libqt4 >= 4.5.0
BuildRequires:  hunspell-devel >= 1.2.4
BuildRequires:  libqt4-devel >= 4.5.0
BuildRequires:  libvorbis-devel
BuildRequires:  libzip-devel
BuildRequires:  phonon-devel
BuildRequires:  zlib-devel

%if 0%{?suse_version}
BuildRequires:  libQtWebKit-devel
BuildRequires:  update-desktop-files

%if 0%{?fedora_version}
BuildRequires:  desktop-file-utils
BuildRequires:  gcc-c++
BuildRequires:  libXtst-devel
BuildRequires:  phonon-devel
BuildRequires:  qt-devel
%if 0%{?fedora_version} > 130
BuildRequires:  qt-webkit-devel


Feature-rich dictionary lookup program.
    * Use of WebKit for an accurate articles' representation, complete with
      all formatting, colors, images and links.
    * Support of multiple dictionary file formats:
      * Babylon .BGL files
      * StarDict .ifo/.dict/.idx/.syn dictionaries
      * Dictd .index/.dict(.dz) dictionary files
      * ABBYY Lingvo .dsl source files
      * ABBYY Lingvo .lsa/.dat audio archives
    * Support for Wikipedia, Wiktionary or any other MediaWiki-based sites
    * Scan popup functionality. A small window pops up with translation of a
      word chosen from antoher application.
    * And much more...

    Konstantin Isakov

%setup -n %{name}-%{gitversion} -q
#%setup -n %{name}-goldendict -q
%patch1 -p1

 %if 0%{?fedora_version}
 qmake-qt4 PREFIX=/usr
 qmake PREFIX=/usr
make %{?jobs:-j %jobs}

  MD5SUM=$(md5sum LICENSE.txt | sed 's/ .*//')
  if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then
      ln -sf /usr/share/doc/licenses/md5/$MD5SUM LICENSE

  %if 0%{?suse_version}  
  INSTALL_ROOT=%{buildroot} %makeinstall
  %suse_update_desktop_file -r %{name} Office Dictionary
  rm -rf %{buildroot}
  make install DESTDIR=%buildroot INSTALL_ROOT=%{buildroot} INSTALL="install -p"

  install -d %{buildroot}/%{_datadir}/%{name}/locale  
  install -m 644 locale/*.qm %{buildroot}/%{_datadir}/%{name}/locale

#  %if 0%{?mandriva_version}  
#  %post  
#  %update_menus  
#  %postun  
#  %clean_menus  
#  %endif  

  rm -rf $RPM_BUILD_ROOT

%doc LICENSE.txt

openSUSE Build Service is sponsored by