%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} %define __builddir %_vpath_builddir Name: frozen-bubble-sdl3 Version: 2.4.139 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 Patch3: %{name}-use-system-iniparser.diff Patch4: %{name}-set-app-data.diff BuildRequires: cmake >= 3.13 BuildRequires: cmake(iniparser) >= 4.2.1 BuildRequires: cmake(SDL3) BuildRequires: cmake(SDL3_image) BuildRequires: cmake(SDL3_mixer) BuildRequires: cmake(SDL3_ttf) BuildRequires: (gcc-c++ or clang) BuildRequires: (ninja or ninja-build) 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 Requires: curl %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 BuildRequires: pkgconfig(glib-2.0) >= 2.10 Conflicts: %{oname}-server Provides: %{oname}-server = %{version}-%{release} %description server %{summary}. %prep %autosetup -p1 %conf export CFLAGS="-fPIE -g $CFLAGS" CXXFLAGS="-fPIE -g $CXXFLAGS" %__cmake -B "%{__builddir}" -DCMAKE_INSTALL_PREFIX="%{_prefix}" -DPREFER_BUNDLED_INIPARSER=OFF -G Ninja %build %__cmake --build "%{__builddir}" --parallel --verbose %install DESTDIR="%{buildroot}" %__cmake --install "%{__builddir}" [ -f "%{__builddir}"/server/fb-server ] && \ install -m755 "%{__builddir}"/server/fb-server %{buildroot}%{_bindir} || \ touch %{buildroot}%{_bindir}/fb-server mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/%{name}.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 SDL_AUDIO_DRIVER=dummy %__ctest --test-dir "%{__builddir}" --output-on-failure || : %files %license COPYING %doc CHANGELOG.md README.md AUTHORS Changes HISTORY %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_iconsdir}/hicolor/64x64/apps/%{name}.png %files data %{_datadir}/%{oname}/ %files server %doc server/AUTHORS server/README %{_bindir}/fb-server