33979b
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
66e4a6
66e4a6
Name:		anki
285798
Version:	1.2.11
ef352f
Release:	2%{?dist}
66e4a6
Summary:	Flashcard program for using space repetition learning
66e4a6
66e4a6
Group:		Amusements/Games
bbbd4f
# the file anki-%%{version}/libanki/anki/features/chinese/unihan.db 
66e4a6
# was created out of  Unihan.txt from www.unicode.org (MIT license)
66e4a6
License:	GPLv3+ and MIT
06a445
URL:		http://ankisrs.net/
bbbd4f
Source0:	http://anki.googlecode.com/files/%{name}-%{version}.tgz
d8841f
Source1:	anki.svg
5a75dc
66e4a6
# Config change: don't check for new updates.
bbbd4f
Patch0:		anki-1.0-noupdate.patch
66e4a6
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
33979b
BuildRequires:	python2-devel, python-setuptools, python-sqlalchemy
32a56e
BuildRequires:	desktop-file-utils, PyQt4, python-simplejson
66e4a6
Requires:	qt4, PyQt4
33979b
Requires:	python-sqlalchemy, python-simplejson
68f63a
Requires:	python-matplotlib
1d0c0c
Requires:	pygame, python-BeautifulSoup
1f47a9
Requires:	pyaudio, sox
66e4a6
BuildArch:	noarch
66e4a6
66e4a6
%description
66e4a6
Anki is a program designed to help you remember facts (such as words
66e4a6
and phrases in a foreign language) as easily, quickly and efficiently
66e4a6
as possible. Anki is based on a theory called spaced repetition.
66e4a6
66e4a6
%prep
1d0c0c
%setup -q
937a54
%patch0 -F 9 -p1 -b .noupdate
937a54
%{__sed} -i -e '/^#!\//, 1d' ankiqt/ui/dropbox.py
66e4a6
66e4a6
%build
66e4a6
pushd libanki
66e4a6
%{__python} setup.py build
66e4a6
popd
1d0c0c
66e4a6
%{__python} setup.py build
66e4a6
66e4a6
66e4a6
%install
66e4a6
rm -rf %{buildroot}
66e4a6
pushd libanki
33979b
%{__python} setup.py install --skip-build --root %{buildroot}
66e4a6
popd
66e4a6
33979b
%{__python} setup.py install --skip-build --root %{buildroot}
66e4a6
66e4a6
install -d %{buildroot}%{_datadir}/applications
66e4a6
desktop-file-install \
66e4a6
  --remove-category=KDE \
66e4a6
  --dir %{buildroot}%{_datadir}/applications \
66e4a6
  %{name}.desktop
66e4a6
66e4a6
install -d %{buildroot}%{_datadir}/pixmaps
d8841f
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/
66e4a6
e0c09e
find %{buildroot} -type f -o -type l|sed '
e0c09e
s:'"%{buildroot}"'::
1cd017
s:\(.*/lib/python2\..*/site-packages/ankiqt/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
1cd017
s:\(.*/lib/python2\..*/site-packages/anki/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
e0c09e
s:^\([^%].*\)::
e0c09e
s:%lang(C) ::
e0c09e
/^$/d' > anki.lang
e0c09e
e0c09e
e0c09e
66e4a6
%clean
66e4a6
rm -rf %{buildroot}
66e4a6
66e4a6
e0c09e
%files -f %{name}.lang
66e4a6
%defattr(-,root,root,-)
1d0c0c
%doc ChangeLog
e0c09e
%doc COPYING CREDITS README*
66e4a6
# libankiqt
66e4a6
%dir %{python_sitelib}/ankiqt
66e4a6
%{python_sitelib}/ankiqt/*.py*
66e4a6
%{python_sitelib}/ankiqt/ui
66e4a6
%{python_sitelib}/ankiqt/forms
66e4a6
66e4a6
# libanki
66e4a6
%dir %{python_sitelib}/anki
66e4a6
%{python_sitelib}/anki/*.py*
66e4a6
%{python_sitelib}/anki/importing
06a445
%{python_sitelib}/anki/template
66e4a6
66e4a6
# locale
66e4a6
%dir %{python_sitelib}/ankiqt/locale/
e0c09e
%dir %{python_sitelib}/ankiqt/locale/*
e0c09e
%dir %{python_sitelib}/ankiqt/locale/*/LC_MESSAGES
66e4a6
%dir %{python_sitelib}/anki/locale/
e0c09e
%dir %{python_sitelib}/anki/locale/*
e0c09e
%dir %{python_sitelib}/anki/locale/*/LC_MESSAGES
66e4a6
66e4a6
%{python_sitelib}/*egg-info
66e4a6
%{_bindir}/anki
66e4a6
%{_datadir}/applications/%{name}.desktop
d8841f
%{_datadir}/pixmaps/%{name}.svg
66e4a6
66e4a6
%changelog
ef352f
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.11-2
ef352f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ef352f
285798
* Sun Jul 01 2012 Christian Krause <chkr@fedoraproject.org> - 1.2.11-1
285798
- Update to new upstream version 1.2.11 (BZ 819821)
285798
- Remove patch (issue was fixed upstream)
285798
33979b
* Wed Feb  8 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 1.2.9-4
33979b
- Remove python-sqlite2 dep as anki will work with the stdlib sqlite3 module
33979b
1c0628
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.9-3
1c0628
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1c0628
d8841f
* Sun Jul 24 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.9-2
d8841f
- Add and install  svg version of anki's icon
d8841f
(extracted from anki-1.2.9/icons/anki-logo.svg)
d8841f
a59a7d
* Thu Jun 30 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.9-1
a59a7d
- Update to new upstream version 1.2.9 (BZ 717584) to fix more
a59a7d
  compatibility issues with python-sqlalchemy-0.7.x
a59a7d
- Remove upstreamed patches
a59a7d
- Add patch to avoid unicode error messages on startup
a59a7d
94e1e3
* Tue Jun 28 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.8-2
94e1e3
- Fix FTBFS issue (BZ 715813)
94e1e3
- Adding two upstream patches to support python-sqlalchemy-0.7.x
94e1e3
54a3a6
* Tue Apr 05 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.8-1
54a3a6
- Update to new upstream version 1.2.8 (BZ 691342)
54a3a6
1f47a9
* Sun Feb 27 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.7-1
1f47a9
- Update to new upstream version 1.2.7 (BZ 678848)
1f47a9
- Add sox as requirement for audio recording (BZ 674493)
1f47a9
cb69fa
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-2
cb69fa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
cb69fa
41d794
* Sat Feb 05 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.6-1
41d794
- Update to new upstream version 1.2.6 (BZ 665163)
41d794
f73c75
* Thu Jan 27 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.5-1
f73c75
- Update to new upstream version 1.2.5 (BZ 665163)
f73c75
807f33
* Sun Jan 23 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.4-1
807f33
- Update to new upstream version 1.2.4 (BZ 665163)
807f33
937a54
* Fri Jan 14 2011 Christian Krause <chkr@fedoraproject.org> - 1.2.2-1
937a54
- Update to new upstream version 1.2.2 (BZ 665163)
937a54
06a445
* Tue Dec 14 2010 Christian Krause <chkr@fedoraproject.org> - 1.1.10-1
06a445
- Update to new upstream version 1.1.10 (BZ 655939)
06a445
0d7c78
* Sat Aug 21 2010 Christian Krause <chkr@fedoraproject.org> - 1.0.1-1
0d7c78
- Update to new upstream version 1.0.1
0d7c78
bbbd4f
* Mon Aug 02 2010 Christian Krause <chkr@fedoraproject.org> - 1.0-1
bbbd4f
- Update to new upstream version 1.0
bbbd4f
- Use original upstream tgz since upstream doesn't ship the problematic
bbbd4f
  example files anymore
bbbd4f
- Remove upstreamed patches
bbbd4f
- Update noupdate patch
32a56e
- Add BR python-simplejson
bbbd4f
1cd017
* Sun Jul 25 2010 Christian Krause <chkr@fedoraproject.org> - 0.9.9.8.6-5
1cd017
- Generalized generation of anki.lang to support any python 2.* release
1cd017
25c0c3
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.9.8.6-4
25c0c3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
25c0c3
98c7de
* Thu May 13 2010 Christian Krause <chkr@fedoraproject.org> - 0.9.9.8.6-3
98c7de
- Add pyaudio as requirement for audio recording
98c7de
- Add upstream patch to prevent anki hanging during audio recording
98c7de
bc05b6
* Sun Feb 28 2010 Christian Krause <chkr@fedoraproject.org> - 0.9.9.8.6-2
bc05b6
- Add a patch to fix a crash when sys tray icon is enabled (BZ 567672)
bc05b6
1d0c0c
* Fri Feb 19 2010 Christian Krause <chkr@fedoraproject.org> - 0.9.9.8.6-1
1d0c0c
- Update to new upstream version
1d0c0c
- Remove example files from upstream tarball due to unknown license
1d0c0c
- Updated noupdate patch
1d0c0c
e0c09e
* Wed Jan 20 2010 Christian Krause <chkr@fedoraproject.org> - 0.9.9.8.5-3.git20100120
e0c09e
- Update to git snapshot
e0c09e
- Includes fix for BZ 546331
e0c09e
a4181e
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9.8.5-2
a4181e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a4181e
ecbc04
* Sun Jul 12 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.8.5-1
ecbc04
- Update to new upstream version 0.9.9.8.5
ecbc04
8c07f1
* Thu Jul 02 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.8.4-1
8c07f1
- Update to new upstream version 0.9.9.8.4
8c07f1
- fix one %%lang tag
8c07f1
3e7127
* Sun May 24 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.9b-1
3e7127
- Update to new upstream version 0.9.9.7.9b to fix a syncing bug
3e7127
ba4f4c
* Tue May 12 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.9-1
ba4f4c
- Update to new upstream version 0.9.9.7.9 to fix an update problem of the 
ba4f4c
statusbar and of the titlebar
ba4f4c
1281e4
* Thu May 07 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.8-2
1281e4
- Bump release
1281e4
96274b
* Wed May 06 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.8-1
96274b
- Update to new upstream version 0.9.9.7.8
96274b
68f63a
* Sat Apr 11 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.4-1
68f63a
- Update to new upstream version 0.9.9.7.4 (BZ 494598)
68f63a
- Require python-matplotlib instead of numpy (BZ 495232)
68f63a
5a75dc
* Wed Apr 01 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.7.1-1
5a75dc
- Update to new upstream version 0.9.9.7.1
5a75dc
- Drop unihaninstall patch (applied upstream)
5a75dc
- Updated noupdate patch
5a75dc
- Use original upstream tgz since upstream doesn't ship the example files
5a75dc
anymore
5a75dc
9234dd
* Sun Mar 01 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.6-4
9234dd
- Bump release
9234dd
6eae78
* Fri Feb 27 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.6-3
6eae78
- Proper packaging of locale files
66e4a6
6eae78
* Fri Feb 13 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.6-2
66e4a6
- Fixed license field
66e4a6
- Install unihan.db
66e4a6
6eae78
* Wed Feb 11 2009 Christian Krause <chkr@fedoraproject.org> - 0.9.9.6-1
6eae78
- First spec file for anki