File sgt-launcher.spec of Package sgt-launcher
#
# spec file for package sgt-launcher
#
# Copyright (c) 2022 SUSE LLC
#
# 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 aname org.bluesabre.SgtLauncher
%define _name sgtlauncher
Name: sgt-launcher
Version: @SERVICE@
Release: 0
Summary: A launcher for Simon Tatham's Portable Puzzle Collection
License: GPL-3.0-or-later
Group: Amusements/Games/Other
URL: https://github.com/bluesabre/sgt-launcher
Source: %{name}-%{version}.tar.xz
BuildRequires: fdupes
# Needed for typelib() - Requires.
BuildRequires: gobject-introspection
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: python3-distutils-extra
BuildRequires: python3-gobject
Requires: puzzles
Requires: python3-gobject
Requires: python3-gobject-Gdk
Requires: python3-xcffib
BuildArch: noarch
%description
SGT Puzzle Launcher (sgt-launcher) is a GTK+ 3 launcher application for Simon
Tatham's Portable Puzzle Collection. The launcher embeds each game into it's
window and wraps game functionality into the UI to make for an improved
experience.
%lang_package
%prep
%autosetup -p1
%build
%py3_build
%install
python3 ./setup.py install -O1 \
--prefix=%{_prefix} \
--root=%{buildroot}
rm -rf %{buildroot}%{_datadir}/doc
%find_lang %{name}
# Python byte compile.
pushd %{buildroot}%{python3_sitelib}/%{_name}_lib/__pycache__
%py3_compile -O ..
popd
%fdupes %{buildroot}%{python3_sitelib}/%{_name}_lib/__pycache__/
%files
%license COPYING
%doc AUTHORS CHANGELOG.md README.md
%dir %{_prefix}/games
%dir %{_datadir}/metainfo
%{_prefix}/games/%{name}
%{_datadir}/metainfo/%{name}.appdata.xml
%{_datadir}/applications/%{aname}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_datadir}/pixmaps/%{name}.??g
%{_datadir}/%{name}
%{_mandir}/man?/%{name}.?%{ext_man}
%{python3_sitelib}/sgt_launcher-*-py%{py3_ver}.egg-info
%{python3_sitelib}/%{_name}/
%{python3_sitelib}/%{_name}_lib/
%files lang -f %{name}.lang
%changelog