Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:		anki
Release:	1%{?dist}
Summary:	Flashcard program for using space repetition learning

Group:		Amusements/Games
# the file anki-%{version}/libanki/anki/features/chinese/unihan.db 
# was created out of  Unihan.txt from (MIT license)
License:	GPLv3+ and MIT

# Config change: don't check for new updates.
Patch0:		anki-
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	python-devel, python-setuptools, python-sqlalchemy
BuildRequires:	PyQt4-devel
BuildRequires:	desktop-file-utils
Requires:	qt4, PyQt4
Requires:	python-sqlalchemy, python-simplejson, python-sqlite2
Requires:	python-matplotlib
Requires:	pygame
BuildArch:	noarch

Anki is a program designed to help you remember facts (such as words
and phrases in a foreign language) as easily, quickly and efficiently
as possible. Anki is based on a theory called spaced repetition.

%setup -q
%patch0 -p1 -b .noupdate 

pushd libanki
%{__python} build

%{__python} build

rm -rf %{buildroot}
pushd libanki
%{__python} install -O1 --skip-build --root %{buildroot}

%{__python} install -O1 --skip-build --root %{buildroot}

install -d %{buildroot}%{_datadir}/applications
desktop-file-install \
  --remove-category=KDE \
  --dir %{buildroot}%{_datadir}/applications \

install -d %{buildroot}%{_datadir}/pixmaps
install -m 644 icons/anki.png %{buildroot}%{_datadir}/pixmaps/

rm -rf %{buildroot}

# libankiqt
%dir %{python_sitelib}/ankiqt

# libanki
%dir %{python_sitelib}/anki

# locale
%dir %{python_sitelib}/ankiqt/locale/
%dir %{python_sitelib}/anki/locale/
%lang(cs) %{python_sitelib}/*/locale/cs_*/
%lang(de) %{python_sitelib}/*/locale/de_*/
%lang(es) %{python_sitelib}/*/locale/es_*/
%lang(fi) %{python_sitelib}/*/locale/fi_*/
%lang(fr) %{python_sitelib}/*/locale/fr_*/
%lang(it) %{python_sitelib}/*/locale/it_*/
%lang(ja) %{python_sitelib}/*/locale/ja_*/
%lang(ko) %{python_sitelib}/*/locale/ko_*/
%lang(pl) %{python_sitelib}/*/locale/pl_*/
%lang(zh) %{python_sitelib}/*/locale/zh_*/
%lang(sv) %{python_sitelib}/*/locale/sv_*/
%lang(pt) %{python_sitelib}/*/locale/pt_*/
%lang(ee) %{python_sitelib}/*/locale/ee_*/
%lang(ee) %{python_sitelib}/*/locale/mn_*/


* Tue May 12 2009 Christian Krause <> -
- Update to new upstream version to fix an update problem of the 
statusbar and of the titlebar

* Thu May 07 2009 Christian Krause <> -
- Bump release

* Wed May 06 2009 Christian Krause <> -
- Update to new upstream version

* Sat Apr 11 2009 Christian Krause <> -
- Update to new upstream version (BZ 494598)
- Require python-matplotlib instead of numpy (BZ 495232)

* Wed Apr 01 2009 Christian Krause <> -
- Update to new upstream version
- Drop unihaninstall patch (applied upstream)
- Updated noupdate patch
- Use original upstream tgz since upstream doesn't ship the example files

* Sun Mar 01 2009 Christian Krause <> -
- Bump release

* Fri Feb 27 2009 Christian Krause <> -
- Proper packaging of locale files

* Fri Feb 13 2009 Christian Krause <> -
- Fixed license field
- Install unihan.db

* Wed Feb 11 2009 Christian Krause <> -
- First spec file for anki