File PySolFC.spec of Package PySolFC

#
# spec file for package PySolFC
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define pythons python3

Name:           PySolFC
Version:        3.4.1
Release:        0
Summary:        PySol Fan Club edition
License:        GPL-3.0-or-later
Group:          Amusements/Games/Board/Card
URL:            http://pysolfc.sourceforge.net/
Source0:        https://datapacket.dl.sourceforge.net/project/pysolfc/%{name}/%{name}-%{version}/%{name}-%{version}.tar.xz
Source1:        %{name}.png
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  python-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3-pip
BuildRequires:  python3-setuptools
BuildRequires:  python3-tk
BuildRequires:  update-desktop-files
## MANUAL BEGIN ##
Requires:       python3-Pillow
Requires:       python3-attrs
Requires:       python3-base
Requires:       python3-configobj
Requires:       python3-pygame
Requires:       python3-pysol-cards >= 0.10.1
Requires:       python3-random2
Requires:       python3-tk
Recommends:     PySolFC-Cardsets >= 2.1
## MANUAL END ##
Conflicts:      pysol
BuildArch:      noarch

%description
PySolFC is a collection of more than 1000 solitaire card games.
It is a fork of PySol Solitaire.

There are games that use the 52 card International Pattern deck,
games for the 78 card Tarock deck, eight and ten suit Ganjifa
games, Hanafuda games, Matrix games, Mahjongg games, and games
for an original hexadecimal-based deck.

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.

PySolFC is distributed under the terms of the GNU General Public
License.

%lang_package

%prep
%autosetup -p1
sed -i -e 's|Icon=%{_datadir}/icons/pysol01.png|Icon=%{name}|g' data/pysol.desktop
sed -i -e 's|Encoding=UTF-8|GenericName=%{name}|g' data/pysol.desktop
# files aren't meant to be executed, remove shebang
find pysollib -name '*.py' | xargs sed -i -e '/\/usr\/bin\/env/d;/\/usr\/bin\/python/d'

%build
export LC_ALL=en_US.utf8
%pyproject_wheel

%install
export LC_ALL=en_US.utf8
%pyproject_install
# menu-entry
%suse_update_desktop_file -i pysol Game CardGame
ln -s pysol.py %{buildroot}%{_bindir}/pysol
%find_lang pysol %{?no_lang_C}
%fdupes -s %{buildroot}

%files
%doc AUTHORS.md NEWS.asciidoc README.md
%license COPYING
%{_bindir}/pysol
%{_bindir}/pysol.py
%{python3_sitelib}/*
%{_datadir}/%{name}/
%{_datadir}/applications/pysol.desktop
%{_datadir}/icons/*/*/apps/pysol*.png

%files lang -f pysol.lang

%changelog
openSUSE Build Service is sponsored by