2ade542
%global cardsets_minimal_ver 2.2.0
cbcb477
4accc18
Name:           PySolFC
e4e81f3
Version:        2.21.0
cdde185
Release:        2%{?dist}
e040fec
Summary:        A collection of solitaire card games
31fd224
License:        GPL-2.0-or-later
83be50c
URL:            https://pysolfc.sourceforge.io
83be50c
Source0:        https://downloads.sourceforge.net/pysolfc/%{name}-%{version}.tar.xz
cb93e9c
Source1:        pysol-start-script
cbcb477
Source2:        https://downloads.sourceforge.net/pysolfc/PySolFC-Cardsets--Minimal-%{cardsets_minimal_ver}.tar.xz
f9d5650
Patch0:         PySolFC-desktop-exec.patch
f9d5650
BuildArch:      noarch
4accc18
55cdf6e
BuildRequires:  python%{python3_pkgversion}-devel
ef91c35
BuildRequires:  python%{python3_pkgversion}-setuptools
600979f
BuildRequires:  desktop-file-utils
e040fec
BuildRequires:  perl-interpreter
10c2f69
10c2f69
%if 0%{?fedora}
c0d4070
# optional but nice to have but not available in any epel branch
c0d4070
# freecell-solver already requires libsfreecell-solver
c0d4070
Recommends:     freecell-solver
c0d4070
Recommends:     python%{python3_pkgversion}-freecell_solver
10c2f69
%endif
10c2f69
9a3b108
Requires:       python%{python3_pkgversion}-imaging
600979f
Requires:       tile
f9d5650
# used to get sound working with PulseAudio
9a3b108
Requires:       python%{python3_pkgversion}-pygame
4accc18
# really required
4accc18
Requires:       tcl
600979f
Requires:       tk
600979f
Requires:       tix
9a3b108
Requires:       python%{python3_pkgversion}-tkinter
9a3b108
Requires:       python%{python3_pkgversion}-imaging-tk
9a3b108
Requires:       python%{python3_pkgversion}-random2
e85cbb2
%if 0%{?fedora} || 0%{?rhel} > 7
e85cbb2
Recommends:     PySolFC-cardsets
e85cbb2
Recommends:     PySolFC-music
c0d4070
%else
c0d4070
# el7 doesn't detect these dependencies
c0d4070
Requires:       python%{python3_pkgversion}-pysol-cards
c0d4070
Requires:       python3-configobj
c0d4070
Requires:       python36-attrs
e85cbb2
%endif
c0d4070
81102e0
Provides:       pysol = %{version}-%{release}
4accc18
4accc18
%description
4accc18
%{name} is a collection of more than 1000 solitaire card games. It is a fork
e040fec
of PySol solitaire. 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
810a027
%autosetup -p1 -a2
4accc18
4accc18
%build
83be50c
%py3_build
4accc18
4accc18
%install
83be50c
%py3_install
4accc18
# install desktop file
48fb77c
desktop-file-install \
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
cbcb477
cp -a PySolFC-Cardsets--Minimal-%{cardsets_minimal_ver}/cardset-* $RPM_BUILD_ROOT%{_datadir}/PySolFC
e040fec
find "$RPM_BUILD_ROOT%{python3_sitelib}/pysollib" -name '*.py' | xargs -L1 perl -ln -i -E 'say if (not (($. == 1) and (m&^#![ \t]*/usr/&)))'
685e190
%py3_shebang_fix $RPM_BUILD_ROOT%{_bindir}/*
4accc18
4accc18
%find_lang pysol
4accc18
4accc18
%files -f pysol.lang
83be50c
%license COPYING
83be50c
%doc README.md
e85cbb2
%{python3_sitelib}/pysollib
83be50c
%{python3_sitelib}/*egg-info
4accc18
%{_bindir}/pysol
e85cbb2
%{_datadir}/%{name}
58713db
%{_datadir}/icons/hicolor/*/apps/*.png
48fb77c
%{_datadir}/applications/*.desktop
4accc18
4accc18
4accc18
%changelog
cdde185
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.21.0-2
cdde185
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
cdde185
e4e81f3
* Wed Jul 12 2023 Shlomi Fish <shlomif@shlomifish.org> 2.21.0-1
e4e81f3
- Update PySolFC to 2.21.0.
e4e81f3
31fd224
* Sat Jun 24 2023 Sérgio Basto <sergio@serjux.com> - 2.20.1-4
31fd224
- Migrate to SPDX license format
31fd224
47eb1e2
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.20.1-3
47eb1e2
- Rebuilt for Python 3.12
47eb1e2
5fcd60a
* Thu May 18 2023 Sérgio Basto <sergio@serjux.com> - 2.20.1-2
2ade542
- Update cardsets_minimal_ver to 2.2.0
6eca2af
ab181ca
* Tue Feb 28 2023 Shlomi Fish <shlomif@shlomifish.org> 2.20.0-1
ab181ca
- Update PySolFC to 2.20.0.
ab181ca
9033dad
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.0-2
9033dad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
9033dad
9449426
* Wed Oct 12 2022 Shlomi Fish <shlomif@shlomifish.org> 2.18.0-1
9449426
- Update PySolFC to 2.18.0.
9449426
53cf324
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.15.0-4
53cf324
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
53cf324
a111988
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.15.0-3
a111988
- Rebuilt for Python 3.11
a111988
10c2f69
* Wed May 04 2022 Sérgio Basto <sergio@serjux.com> - 2.15.0-2
10c2f69
- Fix install on EL where we don't have freecell-solver
10c2f69
cbcb477
* Fri Apr 08 2022 Sérgio Basto <sergio@serjux.com> - 2.15.0-1
cbcb477
- Update PySolFC to 2.15.0 (#2063446)
cbcb477
- Update Cardsets Minimal to 2.1.0
cbcb477
cd8fccf
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.1-2
cd8fccf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
cd8fccf
540b7cf
* Sat Dec 11 2021 Shlomi Fish <shlomif@shlomifish.org> 2.14.1-1
540b7cf
- Update to 2.14.1 (#2031331)
540b7cf
c0d035c
* Sun Sep 19 2021 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 2.14.0-1
c0d035c
- Update to 2.14.0 (#2005720)
c0d035c
810a027
* Thu Aug 12 2021 Sérgio Basto <sergio@serjux.com> - 2.12.0-1
810a027
- Update to 2.12.0
810a027
810a027
* Thu Aug 12 2021 Sérgio Basto <sergio@serjux.com> - 2.10.0-6
810a027
- formatting.py deprecated fix for Pyhton 3.10
810a027
36a6bc1
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.0-5
36a6bc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
36a6bc1
1e9d0f3
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.10.0-4
1e9d0f3
- Rebuilt for Python 3.10
1e9d0f3
14b0761
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.0-3
14b0761
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
14b0761
0edd98e
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.0-2
0edd98e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0edd98e
ef91c35
* Tue Jun 23 2020 Shlomi Fish <shlomif@shlomifish.org> 2.10.0-1
ef91c35
- New upstream release
ef91c35
- Add BuildRequires on setuptools
ef91c35
- Add Requires on python3-freecell_solver
ef91c35
4b35b44
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.8.0-3
4b35b44
- Rebuilt for Python 3.9
4b35b44
e040fec
* Sat Mar 28 2020 Shlomi Fish <shlomif@cpan.org> 2.8.0-2
e040fec
- Fix or remove shebangs (RHBZ 1818150)
e040fec
- Correct the changelog
e040fec
3325873
* Tue Mar 24 2020 Shlomi Fish <shlomif@cpan.org> 2.8.0-1
3325873
- New upstream version
3325873
aaa0c6e
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.4-9
aaa0c6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
aaa0c6e
c2a67ba
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.6.4-8
c2a67ba
- Rebuilt for Python 3.8.0rc1 (#1748018)
c2a67ba
b88a2f7
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.6.4-7
b88a2f7
- Rebuilt for Python 3.8
b88a2f7
3fbd955
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.4-6
3fbd955
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3fbd955
9a3b108
* Sat May 11 2019 Sérgio Basto <sergio@serjux.com> - 2.6.4-5
9a3b108
- Fix some missing %%{python3_pkgversion}
9a3b108
e85cbb2
* Mon May 06 2019 Sérgio Basto <sergio@serjux.com> - 2.6.4-4
e85cbb2
- Add Minimal Cardsets
e85cbb2
55cdf6e
* Wed May 01 2019 Sérgio Basto <sergio@serjux.com> - 2.6.4-3
55cdf6e
- Requires cartsets and music, clean old stuff and enable build for epel7
55cdf6e
a757735
* Sun Apr 28 2019 Sérgio Basto <sergio@serjux.com> - 2.6.4-2
a757735
- Sound fix, seems using SOUND_MOD=auto it works
a757735
d92e541
* Fri Apr 26 2019 Sérgio Basto <sergio@serjux.com> - 2.6.4-1
d92e541
- Upgrade to 2.6.4 and python3 by Shlomi Fish
600979f
- Modernize spec
18981f7
- Add Requires: python3-random2
0180da7
- Reenable defaults of debug package and automagic Python byte compilation
d92e541
befe154
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-19
befe154
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
befe154
26bb3d1
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-18
26bb3d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
26bb3d1
8f3ea1a
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-17
8f3ea1a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8f3ea1a
e5edcf0
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 2.0-16
e5edcf0
- Fix ambiguous Python 2 dependency declarations
e5edcf0
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
e5edcf0
01575bc
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-15
01575bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
01575bc
fdaea58
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-14
fdaea58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
fdaea58
cce2272
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-13
cce2272
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
cce2272
196b220
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-12
196b220
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
196b220
715bebb
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-11
715bebb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
715bebb
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