File goldendict.spec of Package goldendict
#
# spec file for package goldendict
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2008-2009 Buschmann <buschmann23@opensuse.org>
#
# 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/
#
%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}.tar.bz
#Date of goldendict-1290012314.tar: 2010-11-20
#
#The newest .tar.gz ball can be downloaded from:
#http://gitorious.org/goldendict/goldendict/archive-tarball/master
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
%endif
%if 0%{?fedora_version}
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: libXtst-devel
BuildRequires: phonon-devel
BuildRequires: qt-devel
%endif
%if 0%{?fedora_version} > 130
BuildRequires: qt-webkit-devel
%endif
Url: http://goldendict.berlios.de
%description
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...
Author:
-------
Konstantin Isakov
%prep
%setup -n %{name}-%{gitversion} -q
#%setup -n %{name}-goldendict -q
%patch0
%patch1 -p1
%build
%if 0%{?fedora_version}
qmake-qt4 PREFIX=/usr
%else
qmake PREFIX=/usr
%endif
make %{?jobs:-j %jobs}
%install
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
fi
%if 0%{?suse_version}
INSTALL_ROOT=%{buildroot} %makeinstall
%suse_update_desktop_file -r %{name} Office Dictionary
%else
rm -rf %{buildroot}
make install DESTDIR=%buildroot INSTALL_ROOT=%{buildroot} INSTALL="install -p"
%endif
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
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc LICENSE.txt
%defattr(755,root,root,755)
%_bindir/%{name}
%defattr(644,root,root,755)
%_datadir/applications/%{name}.desktop
%_datadir/pixmaps/%{name}.png
%_datadir/%{name}
#%_datadir/%{name}/locale/*.qm
%changelog