File savagewheels.spec of Package savagewheels
#
# spec file for package savagewheels
#
# Copyright (c) 2024 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: savagewheels
Version: 1.6.1
Release: 0
Summary: 2D car crashing arcade game
License: MIT
Group: Amusements/Games/Action/Race
URL: https://kenamick.itch.io/savage-wheels
Source0: https://github.com/kenamick/savagewheels/archive/refs/tags/%{version}.tar.gz
Source1: https://github.com/petarov/savagewheels/releases/download/v1.4/savagewheels-gamedata.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/kenamick/savagewheels/pull/10
Patch0: desktop.patch
BuildRequires: SDL-devel
BuildRequires: cmake
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: glibc-devel
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: tinyxml-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(SDL_mixer)
BuildRequires: pkgconfig(libmikmod)
%description
Savage Wheels is a 2D car crashing arcade game. You take part
in a deadly tournament, the goal of which, is to eliminate all
other derby contestants. Players may choose from a variety of
vehicles, each vehicle has an unique driver and characteristics
like speed, acceleration, armor and damage. Various bonuses may
be collected during each match to increase your vehicle's speed,
damage or to repair it.
%prep
%autosetup -p1
dos2unix HISTORY
cd bin
tar zxf %{SOURCE1}
%build
%cmake \
-DINSTALL_DATADIR=%{_datadir}/%{name} \
-DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \
-DCMAKE_INSTALL_DATAROOTDIR=%{_datadir}
%make_build
%install
%cmake_install
install -Dm644 sw1.png %{buildroot}%{_datadir}/pixmaps/sw1.png
install -Dm644 savagewheels.desktop %{buildroot}%{_datadir}/applications/savagewheels.desktop
%fdupes %{buildroot}%{_datadir}
rm -f %{buildroot}%{_datadir}/doc/savagewheels/HISTORY
rm -f %{buildroot}%{_datadir}/doc/savagewheels/README.md
rm -f %{buildroot}%{_datadir}/doc/savagewheels/LICENSE
%files
%license LICENSE
%doc HISTORY README.md
%{_bindir}/savagewheels
%{_libexecdir}/savagewheels
%{_datadir}/savagewheels
%if 0%{?sle_version} == 150500 && 0%{?is_opensuse}
%{_datadir}/doc/savagewheels
%else
%{_docdir}/savagewheels
%endif
%{_datadir}/applications/savagewheels.desktop
%{_datadir}/pixmaps/sw1.png
%changelog