File pacman-arena.spec of Package pacman-arena

#
# spec file for package pacman-arena
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright Vincent Petry <PVince81@opensuse.org>
#
# 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:           pacman-arena
Version:        0.15
Release:        0
Summary:        Pacman clone in full 3D with a few surprises
License:        GPL-2.0-or-later
Group:          Amusements/Games/Action/Arcade
URL:            http://pacmanarena.sourceforge.net/
# Downloaded source and data archives from SourceForge
# Repacked as tar.bz2, including the data files.
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        %{name}-icons.tar
Source3:        %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE - pacman-arena-0.15-Makefile.patch -- Fix paths, CFLAGS and LDFLAGS
Patch0:         %{name}-0.15-Makefile.patch
Patch1:         fix-gcc15.patch
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
%endif
BuildRequires:  opengl-games-utils
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(SDL_net)
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(sdl)
Requires:       opengl-games-utils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Pacman Arena is a Pacman clone in full 3D with a few surprises.
Rockets, bombs and explosions abound.

A Pacman clone gone mad

Yes, it's Pacman. With rockets. And bombs. And spoiled gameplay. And in full 3D.
Finally, a version of Pacman which will bring your shiny new machine
down to it's knees.

%prep
%autosetup -b 2 -p1

%build
%configure
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install

# install icons
for i in 32 48 64 72 96; do
    install -Dm 0644 ../icons/%{name}_${i}x${i}.png \
            %{buildroot}/%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done

# install Desktop file
install -D -m 644 %{S:1} %{buildroot}%{_datadir}/applications/%{name}.desktop

# symlink OpenGL Wrapper
ln -s opengl-game-wrapper.sh %{buildroot}%{_bindir}/%{name}-wrapper

%if 0%{?suse_version}
    %suse_update_desktop_file %{name}
    %fdupes -s %{buildroot}%{_prefix}
%endif

%files
%defattr(-,root,root,-)
%doc COPYING README
%{_bindir}/%{name}
%{_bindir}/%{name}-wrapper
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by