4accc18
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
4accc18
%define debug_package %{nil}
4accc18
4accc18
%define cardsetversion 1.1
4accc18
4accc18
Name:           PySolFC
cb93e9c
Version:        2.0
a0639ec
Release:        10%{?dist}
4accc18
Summary:        A collection of solitare card games
4accc18
Group:          Amusements/Games
4accc18
License:        GPLv2+
4accc18
URL:            http://pysolfc.sourceforge.net
c0ad027
Source0:        http://downloads.sourceforge.net/pysolfc/%{name}-%{version}.tar.bz2
cb93e9c
Source1:        pysol-start-script
f9d5650
Patch0:         PySolFC-desktop-exec.patch
38b6fcd
Patch1:         PySolFC-pillow.patch
4accc18
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f9d5650
BuildArch:      noarch
4accc18
4accc18
# optional but nice to have
4accc18
Requires:       python-imaging, tile
f9d5650
# used to get sound working with PulseAudio
f9d5650
Requires:       pygame
4accc18
# really required
4accc18
Requires:       tcl
4accc18
Requires:       tk, tix, tkinter
36893b6
Requires:       python-imaging-tk
4accc18
BuildRequires:  python-devel
4accc18
BuildRequires:  desktop-file-utils
81102e0
Provides:       pysol = %{version}-%{release}
4accc18
4accc18
%description
4accc18
%{name} is a collection of more than 1000 solitaire card games. It is a fork
4accc18
of PySol solitare. Its features include modern look and feel (uses Tile widget
4accc18
set), multiple cardsets and tableau backgrounds, sound, unlimited undo, player
4accc18
statistics, a hint system, demo games, a solitaire wizard, support for user
4accc18
written plug-ins, an integrated HTML help browser, and lots of documentation.
4accc18
4accc18
%prep
4accc18
%setup -q
f9d5650
%patch0 -p0 -b .desktop-exec
38b6fcd
%patch1 -p1
4accc18
4accc18
%build
4accc18
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
4accc18
4accc18
%install
4accc18
rm -rf $RPM_BUILD_ROOT
4accc18
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
4accc18
# install desktop file
48fb77c
desktop-file-install \
48fb77c
%if 0%{?fedora} && 0%{?fedora} < 19
48fb77c
    --vendor="fedora" \
48fb77c
%endif
48fb77c
    --delete-original \
4accc18
    --dir=$RPM_BUILD_ROOT/%{_datadir}/applications \
cb93e9c
    $RPM_BUILD_ROOT/%{_datadir}/applications/pysol.desktop
4accc18
4accc18
# install the startup wrapper
4accc18
mv $RPM_BUILD_ROOT%{_bindir}/pysol.py $RPM_BUILD_ROOT%{_datadir}/%{name}
cb93e9c
install -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}/pysol
4accc18
4accc18
%find_lang pysol
4accc18
4accc18
%clean
4accc18
rm -rf $RPM_BUILD_ROOT
4accc18
4accc18
%files -f pysol.lang
4accc18
%defattr(-,root,root)
4accc18
%doc README PKG-INFO COPYING
4accc18
%dir %{_datadir}/%{name}
4accc18
%dir %{python_sitelib}/pysollib
4accc18
%{python_sitelib}/pysollib/*
c0ad027
%{python_sitelib}/*egg-info
4accc18
%{_bindir}/pysol
4accc18
%{_datadir}/%{name}/*
4accc18
%{_datadir}/pixmaps/*
cb93e9c
%{_datadir}/icons/*.png
48fb77c
%{_datadir}/applications/*.desktop
4accc18
4accc18
4accc18
%changelog
a0639ec
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-10
a0639ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a0639ec
eccff7b
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-9
eccff7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
eccff7b
48fb77c
* Wed Mar  6 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 2.0-8
48fb77c
- Remove vendor prefix from desktop files in F19+ https://fedorahosted.org/fesco/ticket/1077
48fb77c
38b6fcd
* Wed Jan 30 2013 Toshio Kuratomi <toshio@fedoraproject.org> 2.0-7
38b6fcd
- Build with a patch so we can use python-pillow instead of python-imaging
38b6fcd
812955c
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-6
812955c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
812955c
ffcd0a7
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-5
ffcd0a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ffcd0a7
a7e3ba6
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4
a7e3ba6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a7e3ba6
c773cc8
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.0-3
c773cc8
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
c773cc8
f9d5650
* Mon Feb 22 2010 Stewart Adam <s.adam at diffingo.com> - 2.0-2
f9d5650
- Patch desktop file to use pysol and not pysol.py for exec
f9d5650
- Force pygame as sound mod, makes PySolFC work with PulseAudio
f9d5650
cb93e9c
* Mon Jan 18 2010 Stewart Adam <s.adam at diffingo.com> - 2.0-1
cb93e9c
- Update to 2.0
cb93e9c
152abf0
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-9
152abf0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
152abf0
c77416b
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-8
c77416b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c77416b
6be7680
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.1-7
6be7680
- Rebuild for Python 2.6
6be7680
c0ad027
* Fri Apr 4 2008 Stewart Adam <s.adam@diffingo.com> 1.1-6
c0ad027
- Fix Source0 URL
c0ad027
- Add egg-info file
c0ad027
- Remove deprecated Encoding key from desktop file
c0ad027
437f21d
* Sat Jan 19 2008 Stewart Adam <s.adam@diffingo.com> 1.1-5
437f21d
- Rebuild
437f21d
81102e0
* Thu Nov 1 2007 Stewart Adam <s.adam@diffingo.com> 1.1-4
81102e0
- Provides: pysol since PySolFC is almost a drop-in replacement for
81102e0
  the now unmaintained pysol
81102e0
36893b6
* Mon Oct 22 2007 Stewart Adam <s.adam@diffingo.com> 1.1-3
36893b6
- s/python-imageing-tk/python-imaging-tk/
36893b6
4accc18
* Fri Oct 19 2007 Stewart Adam <s.adam@diffingo.com> 1.1-2
4accc18
- Add Requires: python-imageing-tk
4accc18
4accc18
* Sat Sep 29 2007 Stewart Adam <s.adam@diffingo.com> 1.1-1
4accc18
- Initial release
4accc18