File hexoshi.spec of Package hexoshi

#
# spec file for package hexoshi
#
# Copyright (c) 2018, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#


Name:           hexoshi
Version:        0.2
Release:        0
Summary:        A free-roaming game inspired by Metroid
License:        GPL-3.0-only
Group:          Amusements/Games/Action/Arcade
URL:            http://hexoshi.nongnu.org/
Source:         http://download.savannah.gnu.org/releases/%{name}/0.2/%{name}-%{version}-src.tar.gz
Source1:        %{name}-wrapper.sh
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
Requires:       python3-pygame >= 1.9.1
Requires:       python3-sge-pygame >= 1.4
Requires:       python3-six >= 1.4
Requires:       python3-tmx >= 1.9
Requires:       python3-uniseg
Requires:       python3-xsge_gui >= 1.0.2
Requires:       python3-xsge_lighting >= 1.0
Requires:       python3-xsge_particle
Requires:       python3-xsge_path >= 1.0
Requires:       python3-xsge_physics >= 0.12
Requires:       python3-xsge_tmx >= 1.1
BuildArch:      noarch

%description
Hexoshi is an action-adventure maze game similar in style to the
original Metroid series. The game consists of exploring the world
and gathering "artifacts" scattered around, fighting enemies along
the way.

%prep
%setup -q -n %{name}-%{version}-src
sed -i 's/\r$//' README.txt
sed -i -e '/^#!\//, 1d' get_ai_data.py get_errors.py
#
sed -i 's|%{_bindir}/env python|%{_bindir}/python3|g' hexoshi.py
sed -i 's|%{_bindir}/env python3|%{_bindir}/python3|g' data/locale/build.py

%build

%install
install -D -m0755 %{SOURCE1} %{buildroot}/%{_bindir}/%{name}
install -D -m0644 data/images/misc/logo.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png
install -d %{buildroot}%{_datadir}/%{name}
mv data/ %{buildroot}%{_datadir}/%{name}
install -m0644 get_ai_data.py get_errors.py %{buildroot}%{_datadir}/%{name}
install -m0755 hexoshi.py %{buildroot}%{_datadir}/%{name}/hexoshi.py
%suse_update_desktop_file -c %{name} %{name} "Hexoshi action-adventure maze game" %{name} %{name} Game ArcadeGame
%fdupes -s %{buildroot}/%{_datadir}

%if 0%{?suse_version} < 1330
%post
%desktop_database_post

%postun
%desktop_database_postun
%endif

%files
%doc README.txt
%license COPYING
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by