%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif %define realname aarddict-desktop Name: aarddict Version: 0.9.2 Release: 3%{?dist} Summary: Multi-platform dictionary and offline Wikipedia reader Group: Applications/Internet License: GPLv3 URL: http://aarddict.org/ Source0: https://github.com/aarddict/desktop/tarball/master/%{realname}-%{version}-1-gb000526.tar.gz Patch0: fixed_warning_from_desktop-file-validate_on_icon_field.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: libicu BuildRequires: libicu-devel BuildRequires: desktop-file-utils Requires: PyQt4, pyicu %description Aard Dictionary is a free, fast, easy to use word look-up program that looks up words fast even with huge dictionaries like English Wikipedia. It looks up words in multiple dictionaries in multiple languages without switching. It works great as offline Wikipedia reader. It has efficient, highly compressed dictionary data storage format with ability to verify data integrity built-in %prep %setup -q -n %{realname}-b000526 %patch0 -p1 -b .fix %build %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root %{buildroot} # Handling desktop file desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop # Find Lang files # %%find_lang %%{name} # Remove shebang from __init__.py sed -i -e '/^#!\//, 1d' %{buildroot}%{python_sitelib}/%{name}/__init__.py # Remove tests rm -rf %{buildroot}%{python_sitelib}/tests %files %defattr(-,root,root,-) %doc LICENSE %doc doc %{python_sitelib}/%{name} %{python_sitelib}/%{name}-%{version}-py?.?.egg-info %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/* %changelog * Mon May 16 2011 Prabin Kumar Datta - 0.9.2-3 - upstream fixed single click install link in Maemo installation notes in doc * Sun Apr 24 2011 Prabin Kumar Datta - 0.9.2-2 - ignored file-not-in-%%lang warning * Fri Apr 22 2011 Prabin Kumar Datta - 0.9.2-1 - upgraded to new version 0.9.2 - fixed the warning message of desktop-file-validate * Wed Apr 20 2011 Prabin Kumar Datta - 0.9.1-3 - removed clean section since not required - added desktop file handing section * Sun Apr 10 2011 Prabin Kumar Datta - 0.9.1-2 - added doc directory under a separate doc macro * Tue Mar 15 2011 Prabin Kumar Datta - 0.9.1-1 - Initial build