File sgt-launcher.spec of Package sgt-launcher
#
# spec file for package sgt-launcher
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 series 0.2
%define _name sgtlauncher
Name: sgt-launcher
Version: 0.2.4
Release: 0
Summary: A launcher for Simon Tatham's Portable Puzzle Collection
License: GPL-3.0-or-later
Group: Amusements/Games/Other
URL: https://launchpad.net/sgt-launcher
Source: https://launchpad.net/sgt-launcher/%{series}/%{version}/+download/%{name}-%{version}.tar.gz
Source1: https://launchpad.net/sgt-launcher/%{series}/%{version}/+download/%{name}-%{version}.tar.gz.asc
Source2: %{name}.keyring
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
Recommends: %{name}-lang
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
%setup -q
%build
python3 ./setup.py 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__/
%if 0%{?suse_version} < 1500
%post
%icon_theme_cache_post
%postun
%icon_theme_cache_postun
%endif
%files
%license COPYING
%doc AUTHORS NEWS README
%dir %{_prefix}/games
%dir %{_datadir}/appdata
%{_prefix}/games/%{name}
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.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