File barrage.spec of Package barrage

#
# spec file for package barrage
#
# 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:           barrage
Version:        1.0.7
Release:        0
Summary:        Kill and destroy as many targets as possible within 3 minutes
License:        GPL-2.0-or-later
Group:          Amusements/Games/Other
URL:            https://lgames.sourceforge.io/Barrage/
Source:         https://prdownloads.sourceforge.net/lgames/barrage-%{version}.tar.gz
Patch0:         %{name}-overflow.patch
BuildRequires:  SDL-devel >= 1.2.0
BuildRequires:  SDL_mixer-devel >= 1.2.0
BuildRequires:  autoconf
BuildRequires:  automake
Requires:       group(games)

%description
Barrage is a rather violent action game with the objective to kill
and destroy as many targets as possible within 3 minutes. The player
controls a gun that may either fire small or large grenades at
soldiers, jeeps and tanks. It is a very simple gameplay though it is
not that easy to get high scores.

%prep
%autosetup -p0

# Replace game path
sed -i -e 's|src_dir="$datadir/games/%{name}"|src_dir="%{_datadir}/%{name}"|g' configure.ac
# Highscore path
sed -i -e 's|localstatedir|sharedstatedir|g' configure.ac

%build
autoreconf -fi
%configure
%make_build

%install
%make_install

%files
%{_bindir}/barrage
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/%{name}*.png
%attr(0664,-,games) %{_sharedstatedir}/%{name}.hscr

%changelog
openSUSE Build Service is sponsored by