File alephone-marathon-infinity.spec of Package alephone-marathon-infinity

#
# spec file for package alephone-marathon-infinity
#
# Copyright (c) 2024 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/
#


Name:           alephone-marathon-infinity
Version:        20240119
Release:        0
Summary:        Bungie Game
License:        SUSE-Freeware
Group:          Amusements/Games/3D/Shoot
URL:            https://alephone.lhowon.org/
Source:         https://github.com/Aleph-One-Marathon/alephone/releases/download/release-%{version}/MarathonInfinity-%{version}-Data.zip
# The icon was converted from a .ico file within the alephone package
Source1:        %{name}.png
BuildRequires:  fdupes
BuildRequires:  unzip
BuildRequires:  update-desktop-files
Requires(post): update-desktop-files
Requires(postun):update-desktop-files
Requires:       alephone = %{version}
Provides:       marathon-infinity = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Marathon Infinity takes the closed universe of the Marathon series
and blows it wide open. The solo/co-op campaign,
“Blood Tides of Lh’owon,” is a 20-level scenario sporting new
textures, weapons, and aliens. More than that, the scenario sheds a
surprising new light on the story’s characters and the meaning of
events. Having defeated the Pfhor and reawakened the ancient
remnants of the S’pht, the player now faces a world where friends
become enemies and all is not what it seems…

Marathon Infinity is the most popular Marathon game in online play,
and is compatible with hundreds of community-made maps. This release
includes the classic graphics, and revamped high-definition
textures and weapons.

%prep
%setup -q -c -n %{name}-%{version}

%build
# Creates a script that will be utilized by desktop file
cat > %{name}.sh <<EOF
#!/bin/sh
/usr/bin/alephone %{_datadir}/%{name}
EOF

%install
mkdir -p %{buildroot}%{_datadir}/%{name}
mv -v Marathon\ Infinity/* %{buildroot}%{_datadir}/%{name}/

install -D -p -m 755 %{name}.sh %{buildroot}%{_bindir}/%{name}
install -D -p -m 644 %{S:1} %{buildroot}%{_datadir}/pixmaps/%{name}.png

%suse_update_desktop_file -c %{name} "Marathon Infinity" "Marathon Infinity" %{name} %{name} "Game;ActionGame;"
%fdupes -s %{buildroot}/%{_prefix}

%files
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by