File alephone-eternalx.spec of Package alephone-eternalx
#
# spec file for package alephone-eternalx
#
# Copyright (c) 2022 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-eternalx
Version: 1.2.1
Release: 0
Summary: A free scenario for Aleph One that continues the story of the Marathon trilogy
License: SUSE-Freeware
Group: Amusements/Games/3D/Shoot
URL: http://eternal.bungie.org/
Source: http://eternal.bungie.org/files/_releases/EternalXv121.zip
Source1: %{name}.png
BuildRequires: fdupes
BuildRequires: unzip
BuildRequires: update-desktop-files
Requires(post): update-desktop-files
Requires(postun):update-desktop-files
Requires: alephone
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Eternal is a free scenario for Aleph One, the multi-platform, open-source,
first-person-shooter engine derived from Bungie's Marathon engine. It continues
the story of the Marathon trilogy, and is a nearly total conversion.
%prep
%setup -q -c -n %{name}-%{version}
# old version control left-overs
find . -name "*.svn" -type d -exec rm -rf {} +
# Mac OS specific filebrowser meta data
find . -name '*.DS_Store' -type f -delete
# Reset permissions on files. Some of the files has executable perms set
find . -type f -exec chmod 0644 {} +
%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 Eternal\ %{version}/* %{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} EternalX "EternalX" %{name} %{name} "Game;ActionGame;"
%fdupes -s %{buildroot}/%{_prefix}
%files
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog