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

Name:		mnemosyne
Summary:	Flash-card learning tool
Version:	1.2.1
Release:	1%{?dist}
Patch0:		%{name}-desktop.patch
License:	GPLv2+
Group:		Amusements/Games
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires:	desktop-file-utils
BuildRequires:	python-devel
BuildRequires:	python-setuptools
BuildArch:	noarch
Requires:	hicolor-icon-theme
Requires:	pygame
Requires:	PyQt

Mnemosyne resembles a traditional flash-card program but with an
important twist: it uses a sophisticated algorithm to schedule the best
time for a card to come up for review.

Optional dependencies:
* latex: enables entering formulas using latex syntax.

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

CFLAGS="$RPM_OPT_FLAGS" %{__python} build

rm -rf %{buildroot}

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

install -d %{buildroot}%{_datadir}/applications
desktop-file-install --vendor="" \
	--dir=%{buildroot}%{_datadir}/applications \

install -d %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps
pushd %{buildroot}/%{_datadir}/icons
mv %{name}.png hicolor/128x128/apps/%{name}.png

rm -rf %{buildroot}

touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :


* Wed Aug 26 2009 Dominik Mierzejewski <> 1.2.1-1
- updated to 1.2.1

* Sat Jul 25 2009 Fedora Release Engineering <> - 1.2-3.r1
- Rebuilt for

* Wed Feb 25 2009 Fedora Release Engineering <> - 1.2-2.r1
- Rebuilt for

* Tue Jan 27 2009 Dominik Mierzejewski <> 1.2-1.r1
- updated to 1.2-r1, fixes

* Tue Nov 11 2008 Dominik Mierzejewski <> 1.1.1-3.r1
- fixed .desktop file comment to conform to GNOME HIG
- removed a redundant python install call
- moved the .desktop file category addition to the patch
- added missing hicolor-icon-theme-requires

* Fri Oct 03 2008 Dominik Mierzejewski <> 1.1.1-2.r1
- updated to 1.1.1-r1
- dropped separate icon (fixed upstream)

* Thu Sep 11 2008 Dominik Mierzejewski <> 1.1.1-1
- initial package
- include fixed icon from 1.1