File jazz2.spec of Package jazz2
#
# spec file for package jazz2
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2022-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/
#
Name: jazz2
Version: 3.4.0
Release: 0
Summary: Reimplementation of Jazz Jackrabbit 2
License: GPL-3.0-only
Group: Amusements/Games/Other
URL: http://deat.tk/jazz2/
#Git-Clone: https://github.com/deathkiller/jazz2-native.git
Source: https://github.com/deathkiller/jazz2-native/archive/refs/tags/%{version}.tar.gz#/%{name}-native-%{version}.tar.gz
BuildRequires: ImageMagick
BuildRequires: cmake
BuildRequires: libSM-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(glfw3)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libopenmpt)
BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(sdl2) >= 2.0.9
BuildRequires: pkgconfig(zlib)
%ifarch %arm aarch64
BuildRequires: Mesa-libGLESv3-devel
%endif
# modified nCine game engine - licensed under MIT
Provides: bundled(nCine)
%if 0%{?sle_version} >= 150400 && 0%{?sle_version} < 160000 && 0%{?is_opensuse}
BuildRequires: gcc11
BuildRequires: gcc11-c++
%else
BuildRequires: gcc-c++ >= 11
%endif
Recommends: %{name}-lang
%description
Jazz² Resurrection - reimplementation of the DOS game
Jazz Jackrabbit 2.
Jazz² Resurrection is a reimplementation of the game Jazz Jackrabbit 2
released in 1998. It Supports various versions of the game
* Shareware Demo
* Holiday Hare '98
* The Secret Files <<< recommended version
* Christmas Chronicles
* partially supports some features of JJ2+ extension and MLLE.
NOTE: To play Jazz Jackrabbit 2 with jazz2 you need the original
game files.
The original game files must be copied to the following directory:
~/.local/share/Jazz²\ Resurrection/Source/
%lang_package
%prep
%setup -q -n %{name}-native-%{version}
convert -strip Sources/Icons/Main.ico %{name}.png
%build
%if 0%{?sle_version} >= 150400 && 0%{?sle_version} < 160000 && 0%{?is_opensuse}
export CC="gcc-11"
export CXX="g++-11"
%endif
## GLFW backend
%cmake \
-DNCINE_DOWNLOAD_DEPENDENCIES=OFF \
-DNCINE_PREFERRED_BACKEND=GLFW \
-DNCINE_LINUX_PACKAGE=jazz2
%cmake_build
mv -v jazz2 ../jazz2_glfw
## SDL2 backend
cd ..
%cmake \
-DNCINE_DOWNLOAD_DEPENDENCIES=OFF \
-DNCINE_PREFERRED_BACKEND=SDL2 \
-DNCINE_LINUX_PACKAGE=jazz2
%cmake_build
mv -v jazz2 ../jazz2_sdl2
%install
install -Dm0755 jazz2_glfw %{buildroot}%{_bindir}/jazz2_glfw
install -Dm0755 jazz2_sdl2 %{buildroot}%{_bindir}/jazz2_sdl2
install -Dm0644 %{name}-0.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png
install -d %{buildroot}%{_datadir}/jazz2/
mv -v ./Content/ %{buildroot}%{_datadir}/jazz2/
%files
%license LICENSE
%doc README.md
%{_bindir}/jazz2_glfw
%{_bindir}/jazz2_sdl2
%{_datadir}/jazz2
%exclude %{_datadir}/jazz2/Content/Translations
%{_datadir}/pixmaps/%{name}.png
%files lang
%{_datadir}/jazz2/Content/Translations
%changelog