%if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %global oname frozen-bubble %global over %{?perl_convert_version:%perl_convert_version 2.213}%{!?perl_convert_version:2.2.2} # Seems to be missing in Cauldron/Mageia 11: %if 0%{!?_vpath_builddir:1} %define _vpath_builddir build %endif # OpenSUSE nonsense, as it seems to do things differently from other RPM # distros just to be a PITA (e.g. %%cmake_build calls `%%__builder -C # %%__builddir` instead of `%%__cmake --build %%_vpath_builddir`; # %%_vpath_builddir is %%_target_platform instead of being the same as # %%__builddir): #define __builder %%__ninja %define __builddir %_vpath_builddir Name: frozen-bubble-sdl3 Version: 2.4.103 Release: %mkrel 1 Summary: Classic bubble puzzle game ported to SDL3 Group: Games/Arcade License: GPLv2 URL: https://github.com/dchau360/frozen-bubble-sdl3 Source: https://github.com/dchau360/frozen-bubble-sdl3/archive/v%{version}/%{name}-v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch0: %{name}-fix-log-location.diff Patch1: %{name}-fix-loop.diff Patch2: %{name}-xdgize-server.diff BuildRequires: pkgconfig BuildRequires: pkgconfig(sdl3) BuildRequires: pkgconfig(sdl3-image) BuildRequires: pkgconfig(sdl3-mixer) BuildRequires: pkgconfig(sdl3-ttf) BuildRequires: cmake >= 3.13 BuildRequires: (gcc-c++ or clang) BuildRequires: python3 %dnl Obsoletes: %{oname} < %{over} # Both frozen-bubble and frozen-bubble-sdl3 install fb-server, frozen-bubble.png, frozen-bubble.desktop, etc. Conflicts: %{oname} Provides: %{oname} = %{version}-%{release} Requires: %{name}-data Requires: %{name}-server %description A C++ / SDL3 port of the classic Frozen Bubble 2, reimplementing its gameplay, network multiplayer, and chain reaction system. The original was Linux-only; this port runs on Linux, macOS, Windows, Android TV, and in the browser. The original was written in Perl; this is a full rewrite in C++. Core gameplay and the network protocol are faithfully reproduced, but edge-case mechanics may still differ — bug reports are welcome via GitHub Issues. %package data Summary: Data files for %{name} BuildArch: noarch %description data %{summary}. %package server Summary: Server for %{name} BuildRequires: pkgconfig(glib-2.0) >= 2.10 Conflicts: %{oname}-server Provides: %{oname}-server = %{version}-%{release} %description server %{summary}. %prep %autosetup -p1 %build %cmake %cmake_build %install %cmake_install pushd "%{_vpath_builddir}" [ -f server/fb-server ] && install -m755 server/fb-server %{buildroot}%{_bindir} || true popd mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/frozen-bubble.desktop << 'EOF' [Desktop Entry] Name=Frozen Bubble Comment=Frozen Bubble SDL3 port Exec=%{name} Icon=%{name} Type=Application Categories=Game;ArcadeGame; EOF mkdir -p %{buildroot}%{_iconsdir}/hicolor/64x64/apps install -m644 %{buildroot}%{_datadir}/frozen-bubble/icons/frozen-bubble-icon-64x64.png \ %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png %check %ctest %files %license COPYING %doc CHANGELOG.md README.md AUTHORS Changes HISTORY %{_bindir}/%{name} %{_datadir}/applications/frozen-bubble.desktop %{_iconsdir}/hicolor/64x64/apps/%{name}.png %files data %{_datadir}/%{oname}/ %files server %doc server/AUTHORS server/README %{_bindir}/fb-server