--- godot.spec	2023-03-09 13:15:41.904269127 +0100
+++ SPECS/godot3.spec	2023-03-09 13:18:56.059075013 +0100
@@ -7,25 +7,25 @@
 # g++: fatal error: environment variable 'RPM_ARCH' not defined
 %undefine _package_note_file
 
-%define uversion %{version}-stable
+%define status  stable
+%define uversion %{version}-%{status}
 
-%define rdnsname org.godotengine.Godot
-
-Name:           godot
-Version:        3.4.5
-Release:        4%{?dist}
-Summary:        Multi-platform 2D and 3D game engine with a feature-rich editor
+%define uname   godot
+%define urdnsname org.godotengine.Godot
+%define rdnsname %{urdnsname}3
+
+Name:           godot3
+Version:        3.5.2
+Release:        1%{?dist}
+Summary:        Multi-platform 2D and 3D game engine with a feature-rich editor (version 3)
 %if 0%{?mageia}
 Group:          Development/Tools
 %endif
 # Godot itself is MIT-licensed, the rest is from vendored thirdparty libraries
 License:        MIT and CC-BY and ASL 2.0 and BSD and zlib and OFL and Bitstream Vera and ISC and MPLv2.0
 URL:            https://godotengine.org
-Source0:        https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-%{uversion}.tar.xz
-Source1:        https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-%{uversion}.tar.xz.sha256
-
-# Fix issue where uint32_t is undefined (add include <cstdint>)
-Patch0:         godot-3.4.5-cstdint.patch
+Source0:        https://downloads.tuxfamily.org/godotengine/%{version}/%{uname}-%{uversion}.tar.xz
+Source1:        https://downloads.tuxfamily.org/godotengine/%{version}/%{uname}-%{uversion}.tar.xz.sha256
 
 # Upstream does not support those arches (for now)
 ExcludeArch:    ppc64 ppc64le s390x
@@ -80,11 +80,10 @@
 %endif
 
 # For desktop and appdata files validation
+BuildRequires:  desktop-file-utils
 %if 0%{?mageia}
 BuildRequires:  appstream-util
-BuildRequires:  desktop-file-utils >= 0.26
 %else
-BuildRequires:  desktop-file-utils
 BuildRequires:  libappstream-glib
 %endif
 
@@ -99,7 +98,7 @@
 %if ! %{system_bullet}
 # Needs at least bullet 2.89 (with a patch, see linked PR) or later (unpatched).
 # https://github.com/bulletphysics/bullet3/pull/2748
-Provides:       bundled(bullet) = 3.17
+Provides:       bundled(bullet) = 3.24
 %endif
 # Godot requires Embree 3, and recent Fedora upgraded to Embree 4 which breaks the API.
 Provides:       bundled(embree) = 3.13.0
@@ -129,10 +128,10 @@
 # Could be unbundled if packaged.
 Provides:       bundled(squish) = 1.15
 # Could be unbundled if packaged.
-Provides:       bundled(tinyexr) = 1.0.0
+Provides:       bundled(tinyexr) = 1.0.1
 
 %description
-Godot is an advanced, feature-packed, multi-platform 2D and 3D game engine.
+Godot 3 is an advanced, feature-packed, multi-platform 2D and 3D game engine.
 It provides a huge set of common tools, so you can just focus on making
 your game without reinventing the wheel.
 
@@ -157,13 +156,13 @@
 
 %if %{with headless}
 %package        headless
-Summary:        Godot headless editor binary for CLI usage
+Summary:        Godot 3 headless editor binary for CLI usage
 %if 0%{?mageia}
 Group:          Development/Tools
 %endif
 
 %description    headless
-This package contains the headless binary for the Godot game engine,
+This package contains the headless binary for the Godot 3 game engine,
 particularly suited for CLI usage, e.g. to export projects from a server
 or build system.
 
@@ -179,13 +178,13 @@
 
 %if %{with server}
 %package        server
-Summary:        Godot headless runtime binary for hosting game servers
+Summary:        Godot 3 headless runtime binary for hosting game servers
 %if 0%{?mageia}
 Group:          Games/Other
 %endif
 
 %description    server
-This package contains the headless binary for the Godot game engine's
+This package contains the headless binary for the Godot 3 game engine's
 runtime, useful to host standalone game servers.
 
 To use editor tools from the command line, see the godot-headless
@@ -199,15 +198,15 @@
 #----------------------------------------------------------------------
 
 %package        runner
-Summary:        Shared binary to play games developed with the Godot engine
+Summary:        Shared binary to play games developed with the Godot 3 game engine
 %if 0%{?mageia}
 Group:          Games/Other
 %endif
 
 %description    runner
 This package contains a godot-runner binary for the Linux X11 platform,
-which can be used to run any game developed with the Godot engine simply
-by pointing to the location of the game's data package.
+which can be used to run any game developed with the Godot 3 game engine
+simply by pointing to the location of the game's data package.
 
 %files          runner
 %license AUTHORS.md COPYRIGHT.txt LICENSE.txt
@@ -216,7 +215,7 @@
 #----------------------------------------------------------------------
 
 %prep
-%autosetup -p1 -n %{name}-%{uversion}
+%autosetup -p1 -n %{uname}-%{uversion}
 
 %build
 # Needs to be in %%build so that system_libs stays in scope
@@ -272,30 +271,30 @@
 
 %install
 install -d %{buildroot}%{_bindir}
-install -m755 bin/%{name}.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}
-install -m755 bin/%{name}.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-runner
+install -m755 bin/%{uname}.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}
+install -m755 bin/%{uname}.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-runner
 %if %{with headless}
-install -m755 bin/%{name}_server.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-headless
+install -m755 bin/%{uname}_server.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-headless
 %endif
 %if %{with server}
-install -m755 bin/%{name}_server.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-server
+install -m755 bin/%{uname}_server.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-server
 %endif
 
 install -D -m644 icon.svg \
     %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
-install -D -m644 misc/dist/linux/%{rdnsname}.desktop \
+install -D -m644 misc/dist/linux/%{urdnsname}.desktop \
     %{buildroot}%{_datadir}/applications/%{rdnsname}.desktop
-install -D -m644 misc/dist/linux/%{rdnsname}.appdata.xml \
+install -D -m644 misc/dist/linux/%{urdnsname}.appdata.xml \
     %{buildroot}%{_datadir}/metainfo/%{rdnsname}.appdata.xml
-install -D -m644 misc/dist/linux/%{rdnsname}.xml \
+install -D -m644 misc/dist/linux/%{urdnsname}.xml \
     %{buildroot}%{_datadir}/mime/application/%{rdnsname}.xml
-install -D -m644 misc/dist/linux/%{name}.6 \
+install -D -m644 misc/dist/linux/%{uname}.6 \
     %{buildroot}%{_mandir}/man6/%{name}.6
-install -D -m644 misc/dist/shell/%{name}.bash-completion \
+install -D -m644 misc/dist/shell/%{uname}.bash-completion \
     %{buildroot}%{_datadir}/bash-completion/completions/%{name}
-install -D -m644 misc/dist/shell/%{name}.fish \
+install -D -m644 misc/dist/shell/%{uname}.fish \
     %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
-install -D -m644 misc/dist/shell/_%{name}.zsh-completion \
+install -D -m644 misc/dist/shell/_%{uname}.zsh-completion \
     %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
 
 %check
@@ -304,6 +303,10 @@
 appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{rdnsname}.appdata.xml
 
 %changelog
+* Thu Mar 09 2023 Rémi Verschelde <akien@fedoraproject.org> - 3.5.2-1
+- Rename package to godot3 in preparation for the incompatible update to Godot 4.0
+- Version 3.5.2-stable
+
 * Tue Feb 21 2023 Rémi Verschelde <akien@fedoraproject.org> - 3.4.5-4
 - Use bundled embree3 for F38 and later, not compatible with embree4 yet
 
