%global cardsets_minimal_ver 3.1.0 %global sname pysolfc Name: PySolFC Version: 3.6.1 Release: 5%{?dist} Summary: A collection of solitaire card games License: GPL-2.0-or-later URL: https://github.com/%{gituser}/%{gitname} Source0: https://downloads.sourceforge.net/pysolfc/%{sname}-%{version}.tar.xz Source1: https://downloads.sourceforge.net/pysolfc/%{name}-Cardsets--Minimal-%{cardsets_minimal_ver}.tar.xz # Backport some stuff Patch1: https://github.com/shlomif/%{name}/commit/a26cadffb1f3d4c657c982d20d269773257a32d5.patch#/Highlight_same_suit.patch Patch2: https://github.com/shlomif/%{name}/commit/9cd42ccb073d932ed8258b02989bb23323683fad.patch#/Add_solvable_Klondike.patch Patch3: https://github.com/shlomif/%{name}/commit/2bd4b8ff5f1b31411249d14a3cdfdc1466aeb3d0.patch#/Defer_win_animation_while_minimized.patch Patch4: https://github.com/shlomif/%{name}/commit/44c8187dc43b0895c5eb8c97a32d07686a9ecc2c.patch#/Clean_up_icon_list.patch Patch5: https://github.com/shlomif/%{name}/commit/f7df22e06a7cd2063b97f51dc1d1bef2f7f936df.patch#/Fix_spider_hint.patch BuildArch: noarch BuildRequires: make BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-tkinter BuildRequires: desktop-file-utils BuildRequires: perl-interpreter BuildRequires: tcl-devel BuildRequires: tk-devel Requires: python%{python3_pkgversion}-pillow Requires: python%{python3_pkgversion}-pygame Requires: tcl Requires: tk Requires: python%{python3_pkgversion}-tkinter Requires: python%{python3_pkgversion}-pillow-tk # Recommends: PySolFC-cardsets # Recommends: PySolFC-music Recommends: freecell-solver Recommends: python%{python3_pkgversion}-freecell_solver Provides: pysol = %{version}-%{release} %description %{name} is a collection of more than 1000 solitaire card games. It is a fork of PySol solitaire. Its features include modern look and feel (uses Tile widget set), multiple card-sets 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 %autosetup -p1 -a1 -n %{sname}-%{version} # Set exec name sed -i 's|Exec=pysol.py|Exec=pysol|' data/pysol.desktop %generate_buildrequires %pyproject_buildrequires %build %make_build all_games_html rules mo %pyproject_wheel # Add start script cat > pysol-start-script << EOF #!/bin/sh /usr/share/PySolFC/pysol.py "\$@" exit \$? EOF cat pysol-start-script %install %pyproject_install # install desktop file desktop-file-install \ --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 pysol-start-script $RPM_BUILD_ROOT/%{_bindir}/pysol cp -a %{name}-Cardsets--Minimal-%{cardsets_minimal_ver}/cardset-* $RPM_BUILD_ROOT%{_datadir}/%{name} find "$RPM_BUILD_ROOT%{python3_sitelib}/pysollib" -name '*.py' | xargs -L1 perl -ln -i -E 'say if (not (($. == 1) and (m&^#![ \t]*/usr/&)))' %find_lang pysol %files -f pysol.lang %license COPYING %doc README.md %{python3_sitelib}/pysollib %{python3_sitelib}/*dist-info %{_bindir}/pysol %{_datadir}/%{name} %{_datadir}/icons/hicolor/*/apps/*.png %{_datadir}/applications/*.desktop %changelog * Fri Jul 24 2026 samoht0 3.6.1 - update 3.6.1 - spec and history cleanup