File alephone-marathon.spec of Package alephone-marathon

#
# spec file for package alephone-marathon
#
# Copyright (c) 2025 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
Version:        20250302
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}/Marathon-%{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:       alephone = %{version}
Requires(post): update-desktop-files
Requires(postun): update-desktop-files
Provides:       marathon = %{version}
BuildArch:      noarch

%description
Alien forces have boarded the interstellar colony ship Marathon.
The situation is dire. As a security officer onboard, it is your
duty to defend the ship and its crew.

Experience the start of Bungie’s iconic trilogy with Marathon. This
release uses the original Marathon data files for the most
authentic experience outside of a classic Mac or emulator.

%prep
%setup -q -c
chmod -x Marathon/Plugins/System_Se7en/Read\ Me.txt
rm Marathon/Plugins/System_Se7en/resources/.DS_Store

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

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

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

%suse_update_desktop_file -c %{name} Marathon "Marathon" %{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