File openbor.spec of Package openbor
#
# spec file for package openbor
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2018-2025, 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/
#
%define minor_version 7533
Name: openbor
Version: 4.0.%{minor_version}
Release: 0
Summary: Moddable fighting game engine (aka Beats of Rage)
License: BSD-3-Clause
Group: Amusements/Games/Action/Arcade
URL: https://www.chronocrash.com/
#Git-Clone: https://github.com/DCurrent/openbor.git
Source0: https://github.com/DCurrent/%{name}/archive/v%{minor_version}.tar.gz#/%{name}-%{minor_version}.tar.gz
Source1: %{name}-wrapper.sh
Source2: %{name}.README.SUSE
Patch0: openbor-fix-build.patch
BuildRequires: ImageMagick
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(SDL2_gfx)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(vorbisfile)
BuildRequires: pkgconfig(vpx)
ExclusiveArch: x86_64
%description
OpenBOR is the open source continuation of Beats of Rage, a Streets of
Rage tribute game originally developed by Senile Team. In the years
since it has grown into arguably the single most powerful two
dimensional sprite-based engine in the world and certainly the most
versatile. While intended to allow creation of side scrolling beat 'em
ups like Double Dragon or Final Fight, the engine is also capable of
replicating shoot 'em ups, RPGs, platformers and the like. A built-in
scripting engine allows authors to take it even further, making
imagination the only real limit.
%prep
%autosetup -p1 -n %{name}-%{minor_version}
# convert icon
convert -strip -resize 48x48 engine/resources/OpenBOR_Icon_128x128.png openbor.png
# disable RPATH
sed -i 's/-Wl,-rpath,$(LIBRARIES)//' engine/Makefile
# verbose output
sed -i 's/@$(CC)/$(CC)/' engine/Makefile
# fix permissions
chmod +x engine/version.sh
%build
%if 0%{?suse_version} >= 1600
%define _lto_cflags %{nil}
export CFLAGS='%{optflags} -Wno-error=address -Wno-error=enum-int-mismatch'
%else
export CFLAGS='%{optflags}'
%endif
cd engine
./version.sh
make SDKPATH=%{_prefix} LNXDEV=%{_bindir} BUILD_LINUX=1 GCC_TARGET=amd64 %{?_smp_mflags}
%install
install -D -m0755 engine/OpenBOR %{buildroot}/%{_libexecdir}/%{name}/%{name}
install -D -m0755 %{SOURCE1} %{buildroot}/%{_bindir}/%{name}
install -D -m0644 %{name}.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png
install -m0644 %{SOURCE2} README.SUSE
%suse_update_desktop_file -c %{name} %{name} "Open Beats of Rage" %{name} %{name} Game ArcadeGame
%files
%license LICENSE
%doc README.md README.SUSE
%license LICENSE
%{_bindir}/%{name}
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%changelog