File slingshot.spec of Package slingshot

# spec file for package slingshot
# Copyright (c) 2017 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

Name:           slingshot
Version:        0.9
Release:        0
Summary:        A two dimensional, turn based simulation-strategy game
License:        GPL-2.0
Group:          Amusements/Games/Strategy/Turn Based
Source3:        %{name}.appdata.xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gnu-free-fonts
BuildRequires:  hicolor-icon-theme
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
Requires:       gnu-free-fonts
Requires:       python-pygame
BuildArch:      noarch

Slingshot is a two dimensional, turn based simulation-strategy game
set in the gravity fields of several planets. It is never the same
from round to round due to its randomly generated playing fields.

%setup -q

python build

# use system fonts
rm -f slingshot/data/FreeSansBold.ttf
ln -sf %{_datadir}/fonts/truetype/FreeSansBold.ttf src/slingshot/data/FreeSansBold.ttf

python install --prefix=%{_prefix} --root=%{buildroot}

mv src/slingshot/data/icon64x64.png src/slingshot/data/slingshot.png
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps
install -p -m 644 src/slingshot/data/slingshot.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps

mkdir -p %{buildroot}%{_datadir}/applications
install -p -m 644 data/slingshot.desktop %{buildroot}%{_datadir}/applications

mkdir -p %{buildroot}%{_datadir}/appdata
install -p -m 664 %{SOURCE3} %{buildroot}%{_datadir}/appdata




openSUSE Build Service is sponsored by