5eb7dc9
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
5eb7dc9
5eb7dc9
Name:		anki
1c10798
Version:	0.9.9.8.5
f9b7c98
Release:	1%{?dist}
5eb7dc9
Summary:	Flashcard program for using space repetition learning
5eb7dc9
5eb7dc9
Group:		Amusements/Games
5eb7dc9
# the file anki-%{version}/libanki/anki/features/chinese/unihan.db 
5eb7dc9
# was created out of  Unihan.txt from www.unicode.org (MIT license)
5eb7dc9
License:	GPLv3+ and MIT
5eb7dc9
URL:		http://www.ichi2.net/anki
cc25428
Source0:	http://ichi2.net/anki/download/files/%{name}-%{version}.tgz
cc25428
5eb7dc9
# Config change: don't check for new updates.
1f040a7
Patch0:		anki-0.9.9.7.8-noupdate.patch
5eb7dc9
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5eb7dc9
BuildRequires:	python-devel, python-setuptools, python-sqlalchemy
5eb7dc9
BuildRequires:	PyQt4-devel
1f040a7
BuildRequires:	desktop-file-utils
5eb7dc9
Requires:	qt4, PyQt4
5eb7dc9
Requires:	python-sqlalchemy, python-simplejson, python-sqlite2
fa730a0
Requires:	python-matplotlib
5eb7dc9
Requires:	pygame
5eb7dc9
BuildArch:	noarch
5eb7dc9
5eb7dc9
%description
5eb7dc9
Anki is a program designed to help you remember facts (such as words
5eb7dc9
and phrases in a foreign language) as easily, quickly and efficiently
5eb7dc9
as possible. Anki is based on a theory called spaced repetition.
5eb7dc9
5eb7dc9
%prep
5eb7dc9
%setup -q
1f040a7
%patch0 -p1 -b .noupdate 
5eb7dc9
5eb7dc9
%build
5eb7dc9
pushd libanki
5eb7dc9
%{__python} setup.py build
5eb7dc9
popd
5eb7dc9
5eb7dc9
%{__python} setup.py build
5eb7dc9
5eb7dc9
5eb7dc9
%install
5eb7dc9
rm -rf %{buildroot}
5eb7dc9
pushd libanki
5eb7dc9
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
5eb7dc9
popd
5eb7dc9
5eb7dc9
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
5eb7dc9
5eb7dc9
install -d %{buildroot}%{_datadir}/applications
5eb7dc9
desktop-file-install \
5eb7dc9
  --remove-category=KDE \
5eb7dc9
  --dir %{buildroot}%{_datadir}/applications \
5eb7dc9
  %{name}.desktop
5eb7dc9
5eb7dc9
install -d %{buildroot}%{_datadir}/pixmaps
5eb7dc9
install -m 644 icons/anki.png %{buildroot}%{_datadir}/pixmaps/
5eb7dc9
5eb7dc9
%clean
5eb7dc9
rm -rf %{buildroot}
5eb7dc9
5eb7dc9
5eb7dc9
%files
5eb7dc9
%defattr(-,root,root,-)
5eb7dc9
%doc COPYING ChangeLog CREDITS README*
5eb7dc9
# libankiqt
5eb7dc9
%dir %{python_sitelib}/ankiqt
5eb7dc9
%{python_sitelib}/ankiqt/*.py*
5eb7dc9
%{python_sitelib}/ankiqt/ui
5eb7dc9
%{python_sitelib}/ankiqt/forms
5eb7dc9
5eb7dc9
# libanki
5eb7dc9
%dir %{python_sitelib}/anki
5eb7dc9
%{python_sitelib}/anki/*.py*
5eb7dc9
%{python_sitelib}/anki/importing
5eb7dc9
5eb7dc9
# locale
5eb7dc9
%dir %{python_sitelib}/ankiqt/locale/
5eb7dc9
%dir %{python_sitelib}/anki/locale/
1c10798
%lang(cs) %{python_sitelib}/*/locale/cs*/
1c10798
%lang(de) %{python_sitelib}/*/locale/de*/
1c10798
%lang(es) %{python_sitelib}/*/locale/es*/
1c10798
%lang(fi) %{python_sitelib}/*/locale/fi*/
1c10798
%lang(fr) %{python_sitelib}/*/locale/fr*/
1c10798
%lang(it) %{python_sitelib}/*/locale/it*/
1c10798
%lang(ja) %{python_sitelib}/*/locale/ja*/
1c10798
%lang(ko) %{python_sitelib}/*/locale/ko*/
1c10798
%lang(pl) %{python_sitelib}/*/locale/pl*/
1c10798
%lang(zh) %{python_sitelib}/*/locale/zh*/
1c10798
%lang(sv) %{python_sitelib}/*/locale/sv*/
1c10798
%lang(pt) %{python_sitelib}/*/locale/pt*/
1c10798
%lang(eo) %{python_sitelib}/*/locale/eo*/
1c10798
%lang(et) %{python_sitelib}/*/locale/et*/
1c10798
%lang(nl) %{python_sitelib}/*/locale/nl*/
1c10798
%lang(ro) %{python_sitelib}/*/locale/ro*/
1c10798
%lang(ru) %{python_sitelib}/*/locale/ru*/
1c10798
%lang(mn) %{python_sitelib}/*/locale/mn*/
1c10798
%lang(nb) %{python_sitelib}/*/locale/nb*/
1c10798
%lang(he) %{python_sitelib}/*/locale/he*/
1c10798
%lang(ar) %{python_sitelib}/*/locale/ar*/
1c10798
%lang(hu) %{python_sitelib}/*/locale/hu*/
5eb7dc9
5eb7dc9
%{python_sitelib}/*egg-info
5eb7dc9
%{_bindir}/anki
5eb7dc9
%{_datadir}/applications/%{name}.desktop
5eb7dc9
%{_datadir}/pixmaps/%{name}.png
5eb7dc9
5eb7dc9
%changelog
1c10798
* Sun Jul 12 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.8.5-1
1c10798
- Update to new upstream version 0.9.9.8.5
1c10798
- fix %%lang tags
1c10798
6525bfd
* Mon May 25 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.9b-1
6525bfd
- Update to new upstream version 0.9.9.7.9b to fix a syncing bug
6525bfd
f9b7c98
* Tue May 12 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.9-1
f9b7c98
- Update to new upstream version 0.9.9.7.9 to fix an update problem of the 
f9b7c98
statusbar and of the titlebar
f9b7c98
1f040a7
* Thu May 07 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.8-2
1f040a7
- Updated noupdate patch
1f040a7
1f040a7
* Wed May 06 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.8-1
1f040a7
- Update to new upstream version 0.9.9.7.8
1f040a7
fa730a0
* Sat Apr 11 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.4-1
fa730a0
- Update to new upstream version 0.9.9.7.4 (BZ 494598)
fa730a0
- Require python-matplotlib instead of numpy (BZ 495232)
fa730a0
1f040a7
* Wed Apr 01 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.1-1
cc25428
- Update to new upstream version 0.9.9.7.1
cc25428
- Drop unihaninstall patch (applied upstream)
cc25428
- Updated noupdate patch
cc25428
- Use original upstream tgz since upstream doesn't ship the example files
cc25428
anymore
cc25428
75f616f
* Sun Mar 01 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.6-4
75f616f
- Bump release
5eb7dc9
75f616f
* Fri Feb 27 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.6-3
75f616f
- Proper packaging of locale files
75f616f
75f616f
* Fri Feb 13 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.6-2
5eb7dc9
- Fixed license field
5eb7dc9
- Install unihan.db
5eb7dc9
75f616f
* Wed Feb 11 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.6-1
75f616f
- First spec file for anki