%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define debug_package %{nil}
Name: PySolFC
Version: 2.0
Release: 2%{?dist}
Summary: A collection of solitare card games
Group: Amusements/Games
License: GPLv2+
URL: http://pysolfc.sourceforge.net
Source0: http://downloads.sourceforge.net/pysolfc/%{name}-%{version}.tar.bz2
Source1: pysol-start-script
Patch0: PySolFC-desktop-exec.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# optional but nice to have
Requires: python-imaging, tile
# used to get sound working with PulseAudio
Requires: pygame
# really required
Requires: tcl
Requires: tk, tix, tkinter
Requires: python-imaging-tk
BuildRequires: python-devel
BuildRequires: desktop-file-utils
Provides: pysol = %{version}-%{release}
%description
%{name} is a collection of more than 1000 solitaire card games. It is a fork
of PySol solitare. Its features include modern look and feel (uses Tile widget
set), multiple cardsets and tableau backgrounds, sound, unlimited undo, player
statistics, a hint system, demo games, a solitaire wizard, support for user
written plug-ins, an integrated HTML help browser, and lots of documentation.
%prep
%setup -q
%patch0 -p0 -b .desktop-exec
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
# install desktop file
desktop-file-install --vendor="fedora" --delete-original \
--dir=$RPM_BUILD_ROOT/%{_datadir}/applications \
$RPM_BUILD_ROOT/%{_datadir}/applications/pysol.desktop
# install the startup wrapper
mv $RPM_BUILD_ROOT%{_bindir}/pysol.py $RPM_BUILD_ROOT%{_datadir}/%{name}
install -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}/pysol
%find_lang pysol
%clean
rm -rf $RPM_BUILD_ROOT
%files -f pysol.lang
%defattr(-,root,root)
%doc README PKG-INFO COPYING
%dir %{_datadir}/%{name}
%dir %{python_sitelib}/pysollib
%{python_sitelib}/pysollib/*
%{python_sitelib}/*egg-info
%{_bindir}/pysol
%{_datadir}/%{name}/*
%{_datadir}/pixmaps/*
%{_datadir}/icons/*.png
%{_datadir}/applications/fedora-*.desktop
%changelog
* Mon Feb 22 2010 Stewart Adam <s.adam at diffingo.com> - 2.0-2
- Patch desktop file to use pysol and not pysol.py for exec
- Force pygame as sound mod, makes PySolFC work with PulseAudio
* Mon Jan 18 2010 Stewart Adam <s.adam at diffingo.com> - 2.0-1
- Update to 2.0
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.1-7
- Rebuild for Python 2.6
* Fri Apr 4 2008 Stewart Adam <s.adam@diffingo.com> 1.1-6
- Fix Source0 URL
- Add egg-info file
- Remove deprecated Encoding key from desktop file
* Sat Jan 19 2008 Stewart Adam <s.adam@diffingo.com> 1.1-5
- Rebuild
* Thu Nov 1 2007 Stewart Adam <s.adam@diffingo.com> 1.1-4
- Provides: pysol since PySolFC is almost a drop-in replacement for
the now unmaintained pysol
* Mon Oct 22 2007 Stewart Adam <s.adam@diffingo.com> 1.1-3
- s/python-imageing-tk/python-imaging-tk/
* Fri Oct 19 2007 Stewart Adam <s.adam@diffingo.com> 1.1-2
- Add Requires: python-imageing-tk
* Sat Sep 29 2007 Stewart Adam <s.adam@diffingo.com> 1.1-1
- Initial release