File bombermaaan.spec of Package bombermaaan

#
# spec file for package bombermaaan
#
# 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:           bombermaaan
Version:        1.4.0
Release:        0
Summary:        A multi-player maze-style bomberman-like game
License:        GPL-3.0+
Group:          Amusements/Games/Action/Arcade
URL:            http://bombermaaan.sourceforge.net/
Source0:        http://downloads.sourceforge.net/bombermaaan/Bombermaaan_%{version}.627_20081018_src.tar.gz
Source1:        http://downloads.sourceforge.net/bombermaaan/Bombermaaan_%{version}.627_20081018_res.tar.gz
Source2:        Bombermaaan-Levels.zip
Source3:        http://bombermaaan.sourceforge.net/images/bomber_a.png
BuildRequires:  gcc-c++
BuildRequires:  SDL-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  unzip
BuildRequires:  update-desktop-files
BuildRequires:  dos2unix
BuildRequires:  hicolor-icon-theme

%description
A classic Bomberman game with multiplayer support, cloned on original SNES games.
Also similar to Dynablaster.

%prep
%setup -q -n Bombermaaan_%{version}.627_20081018_src -a 1 -a 2
cp -a Bombermaaan_%{version}.627_20081018_res/* .
sed -i 's/\$(INSTALL)/install -m755/' Bombermaaan/Makefile
sed -i 's|share/games|share|' Bombermaaan/CGame.cpp
sed -i 's/INSTALL = install/INSTALL = install -m 755/' RESGEN/Makefile
sed -i '74s/char/const char/' Bombermaaan/winreplace.cpp
chmod -x CHANGELOG.txt Readme.html COPYING.txt
dos2unix CHANGELOG.txt Readme.html COPYING.txt

%build
%make_build

%install
install -Dm 755 Bombermaaan/Bombermaaan %{buildroot}%{_bindir}/bombermaaan
mkdir -p %{buildroot}%{_libdir}
install -m 755 RESGEN/libbombermaaan.so.1.0.0 %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_datadir}/bombermaaan
cp -a Levels %{buildroot}%{_datadir}/bombermaaan

install -Dm 644 %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/bombermaaan.png
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/bombermaaan.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=Bombermaaan
Comment=Multi-player strategy bomberman-like game
Exec=bombermaaan
Icon=bombermaaan
Type=Application
Terminal=false
Categories=Game;ArcadeGame;
EOF

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%license COPYING.txt
%doc CHANGELOG.txt Readme.html
%{_bindir}/bombermaaan
%{_libdir}/libbombermaaan.so.1.0.0
%{_datadir}/bombermaaan/
%{_datadir}/applications/bombermaaan.desktop
%{_datadir}/icons/hicolor/32x32/apps/bombermaaan.png

%changelog
openSUSE Build Service is sponsored by