File alienblaster.spec of Package alienblaster

#
# spec file for package alienblaster
#
# 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:           alienblaster
Version:        1.1.0
Release:        0
Summary:        Action-loaded 2D arcade shooter game
License:        GPL-2.0-or-later
Group:          Amusements/Games/Action/Shoot
URL:            https://www.schwardtnet.de/alienblaster/
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}.sh
Source2:        %{name}.desktop
Source3:        %{name}-16x16.png
Source4:        %{name}-32x32.png
Source5:        %{name}-48x48.png
Patch0:         alienblaster-1.1.0-64bit.patch
Patch1:         alienblaster-1.1.0-fullscreen.patch
BuildRequires:  SDL_mixer-devel
BuildRequires:  gcc-c++
Requires:       hicolor-icon-theme

%description
Alien Blaster is an action-loaded 2D arcade shooter game. Your mission in the
game is simple: stop the invasion of the aliens by blasting them.
Simultaneous two-player mode is available.

%prep
%setup -q -n %{name}
%patch -P 0 -p1 -z .64bit
%patch -P 1 -p1 -z .fs

%build
# disable as-needed to fix build
export SUSE_ASNEEDED=0
%make_build OPTIMIZATION="%{optflags}"

%install
# no make install, DIY
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
install -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
install -p -m 755 alienBlaster %{buildroot}%{_bindir}/%{name}.bin
cp -a images sound cfg %{buildroot}%{_datadir}/%{name}

# below is the desktop file and icon stuff.
mkdir -p %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/applications

mkdir -p %{buildroot}%{_datadir}/icons/hicolor/16x16/apps
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
install -p -m 644 %{SOURCE3} \
  %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
install -p -m 644 %{SOURCE4} \
  %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
install -p -m 644 %{SOURCE5} \
  %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png

%files
%license LICENSE
%doc CHANGELOG AUTHORS
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/

%changelog
openSUSE Build Service is sponsored by