File opendict.spec of Package opendict
Name: opendict
Summary: OpenDict is open-source multiplatform computer dictionary software
Version: 0.6.3
Release: 0
License: GPL version 2 or of any later version
Group: Productivity/Office/Dictionary
Source: %name-%version.tar.bz2
Patch1: %name-%version-desktop.patch
Patch2: opendict-no-xml-dom-ext.patch
BuildArch: noarch
# pygettext is currently in python-demo package only
BuildRequires: update-desktop-files python-demo gettext-tools
BuildRequires: hicolor-icon-theme fdupes
Requires: python-wxGTK pyxml gettext
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
OpenDict is open-source multiplatform computer dictionary software. Supported
dictionary formats include:
* DICT
* Slowo
* Mova
* Plugin dictionaries
OpenDict has a built-in DICT client, so you can use it to connect to large
databases (like dict.org).
If your company (or you) is going to develop a dictionary (simple or very
complex), then OpenDict is ready to use platform for any dictionary, because it
supports Plugin dictionaries that can be developed to act the way you wish.
Author:
-------
Martynas Jocius <martynas.jocius@idiles.com>
%prep
%setup -q
%patch1 -p0
## sed -i "s|/usr/bin/pygettext.py|%_datadir/doc/packages/python/Tools/i18n/pygettext.py|g" po/Makefile
%patch2 -p1
%build
%install
mkdir -p %buildroot%_bindir
mkdir -p %buildroot%_datadir/{applications,pixmaps}
mkdir -p %buildroot%_datadir/icons/hicolor/{24x24,32x32,48x48,96x96,scalable}/apps/
%makeinstall DESTDIR=%buildroot%_prefix
# desktop stuff
ln -s %_datadir/icons/hicolor/32x32/apps/%name.png %buildroot%_datadir/pixmaps/
%suse_update_desktop_file -n %name Office Dictionary
rm %buildroot%_bindir/opendict
# use the "right" symlink
ln -s %_datadir/opendict/opendict.py %buildroot%_bindir/opendict
# install manpage
install -Dm644 %name.1 %buildroot%_mandir/man1/%name.1
%fdupes -s %buildroot
%find_lang %name
%clean
rm -rf %buildroot
%files -f %name.lang
%defattr(-,root,root)
%doc AUTHORS.txt copying.html README.txt TODO.txt doc/Plugin-HOWTO.html
%_mandir/man1/%{name}*
%_bindir/opendict
%_datadir/icons/hicolor/*/apps/*
%_datadir/opendict
%_datadir/applications/opendict.desktop
%_datadir/pixmaps/%name.png