File ardentryst.spec of Package ardentryst

#
# spec file for package ardentryst
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright Vincent Petry <PVince81@yahoo.fr>
#
# 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:           ardentryst
Version:        1.71
Release:        0
Summary:        Ardentryst
License:        GPL-3.0
Group:          Amusements/Games/RPG
Url:            http://jordan.trudgett.com/
# Downloaded ardentryst171.tar.gz from sourceforge,
# Then created separate archives using the prepare_sources.sh script
# ./prepare_sources.sh
Source:         %{name}-%{version}.tar.bz2
Patch0:         python3.patch
Patch1:         python3fix.patch
Patch2:         savesfix.patch
Patch3:         offline.patch
Patch4:         deprecationfix.patch
BuildRequires:  python3
Requires:       %{name}-data = %{version}
Requires:       python3
Requires:       python3-pygame
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
Ardentryst is an action/RPG sidescoller, focused not just on fighting, but on story, and character development. Strategy as well as reflexes will be needed to overcome the game. The game is set in another world. It is somewhat a cross between Donkey Kong Country, Mario, Castlevania and Kingdom Hearts. Ardentryst is focused on a fantasy world. The player is guided through a storyline which he or her must act in and play a major role in keeping peace and order in Ardentryst. It features two playable characters and a variety of weapons, items, armour, monsters, and beautiful level scenery and graphics.

%prep
%autosetup -p1

%build
# Dynamically create the startup file
echo "#!/bin/bash
	cd %{_datadir}/%{name}/
	python3 %{name}.py
	" > %{name}
chmod 0755 %{name}

# Compile the python sources
%{py3_compile .}

%install
mkdir -p %{buildroot}%{_bindir}/
cp %{name} %{buildroot}%{_bindir}/
install -m 755 -d -D %{buildroot}%{_datadir}/%{name}/
install -m 644 -D *.py* OPR.txt %{buildroot}%{_datadir}/%{name}/
install -m 755 -d -D %{buildroot}%{_datadir}/pixmaps/
install -m 644 -D icon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -m 755 -d -D %{buildroot}%{_datadir}/applications/
install -m 644 -D Ardentryst.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif

%files
%defattr(-,root,root,-)
%doc help.txt README.txt COPYING
%{_bindir}/%{name}
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by