File cannonball.spec of Package cannonball

#
# spec file for package cannonball
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2018, Martin Hauke <mardnh@gmx.de>
#
# 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:           cannonball
Version:        0.34
Release:        0
Summary:        An Enhanced OutRun Engine
License:        NonFree
Group:          Amusements/Games/Action/Arcade
URL:            http://reassembler.blogspot.com/
#Git-Clone:     https://github.com/djyt/cannonball.git
Source:         https://github.com/djyt/cannonball/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        %{name}-wrapper.sh
Source2:        cannonball.README.SUSE
BuildRequires:  ImageMagick
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(sdl2)

%description
Cannonball is a program which allows you to play an enhanced version of 
Yu Suzuki's seminal arcade racer, OutRun, on a variety of systems:

 - 60 fps gameplay (smoother than the original game)
 - True widescreen mode (extend the play area by 25%)
 - High Resolution mode (improves sprite scaling)
 - Time Trial Mode
 - Cheats
 - Customisable Music
 - High Score Saving
 - Western, Japanese & prototype track support
 - Analog & Digital controllers supported
 - Force Feedback / Haptic support (Windows only)
 - Fixes bugs present in the original game

%prep
%setup -q
convert -strip res/%{name}.ico %{name}.png

%build
%cmake ../cmake -DTARGET=linux.cmake
%make_build

%install
# Install wrapper
install -d %{buildroot}/%{_bindir}
sed 's|@LIBEXEC_DIR@|%{_libexecdir}|' %{SOURCE1} > %{buildroot}/%{_bindir}/%{name}
chmod 0755 %{buildroot}/%{_bindir}/%{name}
# Install binary
install -D -m0755 build/%{name} %{buildroot}/%{_libexecdir}/%{name}/%{name}
# Install data
install -d %{buildroot}/%{_datadir}/%{name}/res
install -m0644 res/tilemap.bin %{buildroot}/%{_datadir}/%{name}/res/tilemap.bin
install -m0644 res/tilepatch.bin %{buildroot}/%{_datadir}/%{name}/res/tilepatch.bin
install -m0644 build/config.xml %{buildroot}/%{_datadir}/%{name}/config.xml
install -m0644 %{SOURCE2} README.SUSE
# Install misc data
install -D -m0644 %{name}.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file -c %{name} %{name} "An Enhanced OutRun Engine" %{name} %{name} Game ArcadeGame

%files
%license docs/license.txt
%doc README.md roms/roms.txt README.SUSE
%{_bindir}/%{name}
%{_libexecdir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/config.xml
%{_datadir}/%{name}/res
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by