07f301f
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
07f301f
07f301f
Name:		mnemosyne
07f301f
Summary:	Flash-card learning tool
67c2d6e
Version:	1.2.2
a6312f1
Release:	4%{?dist}
07f301f
URL:		http://www.mnemosyne-proj.org/
80f7501
Source0:	http://downloads.sourceforge.net/sourceforge/mnemosyne-proj/%{name}-%{version}.tgz
07f301f
Patch0:		%{name}-desktop.patch
07f301f
License:	GPLv2+
07f301f
Group:		Amusements/Games
07f301f
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
07f301f
BuildRequires:	desktop-file-utils
54633d4
BuildRequires:	python-devel
80f7501
BuildRequires:	python-setuptools
07f301f
BuildArch:	noarch
07f301f
Requires:	hicolor-icon-theme
07f301f
Requires:	pygame
07f301f
Requires:	PyQt
2d32feb
Requires:	python-imaging
07f301f
07f301f
%description
07f301f
Mnemosyne resembles a traditional flash-card program but with an
07f301f
important twist: it uses a sophisticated algorithm to schedule the best
07f301f
time for a card to come up for review.
07f301f
07f301f
Optional dependencies:
07f301f
* latex: enables entering formulas using latex syntax.
07f301f
07f301f
%prep
07f301f
%setup -q
07f301f
%patch0 -p1 -b .d
07f301f
07f301f
%build
07f301f
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
07f301f
07f301f
%install
07f301f
rm -rf %{buildroot}
07f301f
07f301f
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
07f301f
07f301f
install -d %{buildroot}%{_datadir}/applications
07f301f
desktop-file-install --vendor="" \
07f301f
	--dir=%{buildroot}%{_datadir}/applications \
07f301f
	%{name}.desktop
07f301f
07f301f
install -d %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps
07f301f
pushd %{buildroot}/%{_datadir}/icons
07f301f
mv %{name}.png hicolor/128x128/apps/%{name}.png
07f301f
popd
07f301f
07f301f
%clean
07f301f
rm -rf %{buildroot}
07f301f
07f301f
%post
07f301f
touch --no-create %{_datadir}/icons/hicolor
07f301f
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
07f301f
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
07f301f
fi
07f301f
07f301f
%postun
07f301f
touch --no-create %{_datadir}/icons/hicolor
07f301f
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
07f301f
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
07f301f
fi
07f301f
07f301f
%files
07f301f
%defattr(-,root,root,-)
07f301f
%doc AUTHORS ChangeLog LICENSE README
07f301f
%{_bindir}/%{name}
07f301f
%{python_sitelib}/%{name}
07f301f
%{python_sitelib}/Mnemosyne-%{version}-*.egg-info
07f301f
%{_datadir}/applications/%{name}.desktop
07f301f
%{_datadir}/icons/hicolor/*/apps/%{name}.png
07f301f
07f301f
%changelog
a6312f1
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-4
a6312f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a6312f1
2d32feb
* Wed Nov 17 2010 Jiri Popelka <jpopelka@redhat.com> - 1.2.2-3
2d32feb
- requires Python Imaging Library (PIL) (bug #654291)
2d32feb
12cb782
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.2.2-2
12cb782
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
12cb782
67c2d6e
* Wed Jul 07 2010 Dominik Mierzejewski <rpm@greysector.net> 1.2.2-1
67c2d6e
- updated to 1.2.2
67c2d6e
- upstream changelog: http://www.mnemosyne-proj.org/news.php
67c2d6e
80f7501
* Wed Aug 26 2009 Dominik Mierzejewski <rpm@greysector.net> 1.2.1-1
80f7501
- updated to 1.2.1
80f7501
4280e9e
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3.r1
4280e9e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
4280e9e
edb0d42
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2.r1
edb0d42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
edb0d42
e45906a
* Tue Jan 27 2009 Dominik Mierzejewski <rpm@greysector.net> 1.2-1.r1
e45906a
- updated to 1.2-r1, fixes https://bugs.launchpad.net/mnemosyne-proj/+bug/252152
e45906a
07f301f
* Tue Nov 11 2008 Dominik Mierzejewski <rpm@greysector.net> 1.1.1-3.r1
07f301f
- fixed .desktop file comment to conform to GNOME HIG
07f301f
- removed a redundant python setup.py install call
07f301f
- moved the .desktop file category addition to the patch
07f301f
- added missing hicolor-icon-theme-requires
07f301f
07f301f
* Fri Oct 03 2008 Dominik Mierzejewski <rpm@greysector.net> 1.1.1-2.r1
07f301f
- updated to 1.1.1-r1
07f301f
- dropped separate icon (fixed upstream)
07f301f
07f301f
* Thu Sep 11 2008 Dominik Mierzejewski <rpm@greysector.net> 1.1.1-1
07f301f
- initial package
07f301f
- include fixed icon from 1.1