/[packages]/cauldron/godot/current/SPECS/godot.spec
ViewVC logotype

Contents of /cauldron/godot/current/SPECS/godot.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2180793 - (show annotations) (download)
Sun May 4 12:10:06 2025 UTC (5 weeks, 4 days ago) by daviddavid
File size: 9388 byte(s)
- rebuild for new miniupnpc 2.3.2

1 %if 0%{?fedora}
2 # With _package_note_file enabled, godot.x11.opt.tools fails to link with:
3 # g++: fatal error: environment variable 'RPM_ARCH' not defined
4 %undefine _package_note_file
5 %ifarch %{arm32}
6 %global _lto_cflags %nil
7 %endif
8 %endif
9
10 # Undefine for stable
11 #define prerel 1
12 %define status stable
13 %define uversion %{version}-%{status}
14
15 %define rdnsname org.godotengine.Godot
16
17 Name: godot
18 Version: 4.4.1
19 Release: %mkrel 2
20 Summary: Multi-platform 2D and 3D game engine with a feature-rich editor
21 %if 0%{?mageia}
22 Group: Development/Tools
23 %endif
24 License: MIT AND AML-glslang AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND CC0-1.0 AND CC-BY-4.0 AND MPL-2.0 AND OFL-1.1 AND Unlicense AND Zlib
25 URL: https://godotengine.org
26 Source0: https://github.com/godotengine/godot-builds/releases/download/%{uversion}/%{name}-%{uversion}.tar.xz
27 Source1: https://github.com/godotengine/godot-builds/releases/download/%{uversion}/%{name}-%{uversion}.tar.xz.sha256
28
29 # Preconfigure Blender and oidnDenoise paths to use system-installed versions.
30 Patch0: preconfigure-blender-oidn-paths.patch
31
32 # Upstream does not support this arch (for now)
33 ExcludeArch: s390x
34
35 BuildRequires: gcc-c++
36 BuildRequires: libsquish-devel
37 BuildRequires: mbedtls-devel
38 BuildRequires: miniupnpc-devel
39 BuildRequires: pkgconfig(alsa)
40 BuildRequires: pkgconfig(dbus-1)
41 BuildRequires: pkgconfig(fontconfig)
42 BuildRequires: pkgconfig(freetype2)
43 BuildRequires: pkgconfig(harfbuzz)
44 BuildRequires: pkgconfig(harfbuzz-icu)
45 BuildRequires: pkgconfig(gl)
46 BuildRequires: pkgconfig(graphite2)
47 BuildRequires: pkgconfig(icu-i18n)
48 BuildRequires: pkgconfig(icu-uc)
49 BuildRequires: pkgconfig(libbrotlicommon)
50 BuildRequires: pkgconfig(libbrotlidec)
51 BuildRequires: pkgconfig(libdecor-0)
52 BuildRequires: pkgconfig(libpcre2-32)
53 BuildRequires: pkgconfig(libpng)
54 BuildRequires: pkgconfig(libpulse)
55 BuildRequires: pkgconfig(libudev)
56 BuildRequires: pkgconfig(libwebp)
57 BuildRequires: pkgconfig(libwslay)
58 BuildRequires: pkgconfig(libzstd)
59 BuildRequires: pkgconfig(ogg)
60 BuildRequires: pkgconfig(openxr)
61 BuildRequires: pkgconfig(speech-dispatcher)
62 BuildRequires: pkgconfig(theora)
63 BuildRequires: pkgconfig(theoradec)
64 BuildRequires: pkgconfig(vorbis)
65 BuildRequires: pkgconfig(vorbisfile)
66 BuildRequires: pkgconfig(wayland-client)
67 BuildRequires: pkgconfig(wayland-cursor)
68 BuildRequires: pkgconfig(wayland-egl)
69 BuildRequires: pkgconfig(x11)
70 BuildRequires: pkgconfig(xcursor)
71 BuildRequires: pkgconfig(xext)
72 BuildRequires: pkgconfig(xi)
73 BuildRequires: pkgconfig(xinerama)
74 BuildRequires: pkgconfig(xkbcommon)
75 BuildRequires: pkgconfig(xrandr)
76 BuildRequires: pkgconfig(xrender)
77 BuildRequires: pkgconfig(zlib)
78
79 %ifarch aarch64 x86_64
80 BuildRequires: embree-devel >= 4
81 %endif
82
83 %if 0%{?mageia}
84 BuildRequires: scons
85 %else
86 BuildRequires: python3-scons
87 %endif
88
89 # See bundled section for explanations.
90 %define system_glslang 0
91 %define system_recastnavigation 0%{?mageia}
92
93 %if %{system_glslang}
94 BuildRequires: glslang-devel
95 %endif
96
97 %if %{system_recastnavigation}
98 BuildRequires: recastnavigation-devel
99 %endif
100
101 # For desktop and appdata files validation
102 BuildRequires: desktop-file-utils
103 %if 0%{?mageia}
104 BuildRequires: appstream-util
105 %else
106 BuildRequires: libappstream-glib
107 %endif
108
109 # Ensure the hicolor icon theme dirs exist
110 Requires: hicolor-icon-theme
111
112 # To support importing .blend files
113 Recommends: blender
114 # For better denoising of lightmaps, using oidnDenoise
115 Recommends: oidn
116
117 # Bundled libraries: many of the libraries code in `thirdparty` can be
118 # unbundled when the libraries are provided by the system. Keep in mind
119 # though that the `thirdparty` folder also contains code which is typically
120 # not packaged in distros, and is probably best left bundled.
121
122 # Has some modifications for IPv6 support, upstream enet is unresponsive.
123 # Should not be unbundled.
124 # Cf: https://github.com/godotengine/godot/issues/6992
125 Provides: bundled(enet) = 1.3.18
126 %if ! %{system_glslang}
127 # Fedora package only provides static libs, needs more work to be usable.
128 Provides: bundled(glslang) = 14.2.0
129 %endif
130 # Has custom changes to support seeking in zip archives.
131 # Should not be unbundled.
132 Provides: bundled(minizip) = 1.3.1
133 %if ! %{system_recastnavigation}
134 # Could be unbundled if packaged.
135 Provides: bundled(recastnavigation) = 1.6.0
136 %endif
137
138 Obsoletes: godot-headless < 4.0-1
139 Provides: godot-headless == %{version}-%{release}
140
141 %description
142 Godot is an advanced, feature-packed, multi-platform 2D and 3D game engine.
143 It provides a huge set of common tools, so you can just focus on making
144 your game without reinventing the wheel.
145
146 Godot is completely free and open source under the very permissive MIT
147 license. No strings attached, no royalties, nothing. Your game is yours,
148 down to the last line of engine code.
149
150 To use the editor on the command line in a non-graphical environment (e.g. to
151 export games from the source code), use the --headless flag.
152
153 %files
154 %doc CHANGELOG.md DONORS.md README.md
155 %license AUTHORS.md COPYRIGHT.txt LICENSE.txt LOGO_LICENSE.txt
156 %{_bindir}/%{name}
157 %{_datadir}/applications/%{rdnsname}.desktop
158 %{_datadir}/bash-completion/completions/%{name}
159 %{_datadir}/fish/vendor_completions.d/%{name}.fish
160 %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
161 %{_datadir}/metainfo/%{rdnsname}.appdata.xml
162 %{_datadir}/mime/packages/%{rdnsname}.xml
163 %{_datadir}/zsh/site-functions/_%{name}
164 %{_mandir}/man6/%{name}.6*
165
166 #----------------------------------------------------------------------
167
168 %package runner
169 Summary: Shared binary to play games and run servers developed with the Godot engine
170 %if 0%{?mageia}
171 Group: Games/Other
172 %endif
173 Obsoletes: godot-server < 4.0-1
174 Provides: godot-server == %{version}-%{release}
175
176 %description runner
177 This package contains a godot-runner binary for the Linux X11 platform,
178 which can be used to run any game developed with the Godot engine simply
179 by pointing to the location of the game's data package.
180
181 To run the game as a dedicated server, use the --headless flag.
182
183 %files runner
184 %license AUTHORS.md COPYRIGHT.txt LICENSE.txt
185 %{_bindir}/%{name}-runner
186
187 #----------------------------------------------------------------------
188
189 %{lua: function get_godot_arch()
190 arch = rpm.expand("%{_target_cpu}")
191 if string.match(rpm.expand("%{arm32}"), arch) then
192 arch = "arm32"
193 elseif string.match(rpm.expand("%{arm64}"), arch) then
194 arch = "arm64"
195 elseif string.match(rpm.expand("%{ix86}"), arch) then
196 arch = "x86_32"
197 elseif string.match(rpm.expand("%{power64}"), arch) then
198 arch = "ppc64"
199 elseif string.match(rpm.expand("%{riscv64}"), arch) then
200 arch = "rv64"
201 end
202 return arch
203 end}
204
205 %define godot_arch %{lua: print(get_godot_arch())}
206
207 %prep
208 %autosetup -p1 -n %{name}-%{uversion}
209
210 # Patch for miniupnpc 2.2.8 (api 18)
211 sed -i 's/addr, 16/addr, 16, nullptr, 0/g' modules/upnp/upnp.cpp
212
213 %build
214 # Needs to be in %%build so that system_libs stays in scope
215 # We don't unbundle enet and minizip as they have necessary custom changes
216 to_unbundle="brotli embree freetype graphite harfbuzz icu4c libogg libpng libtheora libvorbis libwebp mbedtls miniupnpc pcre2 squish wslay zlib zstd"
217
218 %if %{system_glslang}
219 to_unbundle+=" glslang"
220 %endif
221 %if %{system_recastnavigation}
222 to_unbundle+=" recastnavigation"
223 %endif
224
225 # Disable dlopen wrappers for Linux deps, we link them dynamically.
226 system_libs="use_sowrap=no "
227 rm -rf thirdparty/linuxbsd_headers
228
229 for lib in $to_unbundle; do
230 system_libs+="builtin_"$lib"=no "
231 rm -rf thirdparty/$lib
232 done
233
234 %define _scons scons %{?_smp_mflags} "CCFLAGS=%{?build_cflags}" "LINKFLAGS=%{?build_ldflags}" arch=%{godot_arch} $system_libs lto=full use_static_cpp=no debug_symbols=yes progress=no
235
236 %if 0%{?fedora}
237 export BUILD_NAME="fedora"
238 %endif
239 %if 0%{?mageia}
240 export BUILD_NAME="mageia"
241 %endif
242
243 # Build graphical editor.
244 %_scons p=linuxbsd target=editor
245
246 # Build game runner.
247 %_scons p=linuxbsd target=template_release
248
249 %install
250 install -d %{buildroot}%{_bindir}
251 install -m755 bin/%{name}.linuxbsd.editor.%{godot_arch} %{buildroot}%{_bindir}/%{name}
252 install -m755 bin/%{name}.linuxbsd.template_release.%{godot_arch} %{buildroot}%{_bindir}/%{name}-runner
253
254 install -D -m644 icon.svg \
255 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
256 install -D -m644 misc/dist/linux/%{rdnsname}.desktop \
257 %{buildroot}%{_datadir}/applications/%{rdnsname}.desktop
258 install -D -m644 misc/dist/linux/%{rdnsname}.appdata.xml \
259 %{buildroot}%{_datadir}/metainfo/%{rdnsname}.appdata.xml
260 install -D -m644 misc/dist/linux/%{rdnsname}.xml \
261 %{buildroot}%{_datadir}/mime/packages/%{rdnsname}.xml
262 install -D -m644 misc/dist/linux/%{name}.6 \
263 %{buildroot}%{_mandir}/man6/%{name}.6
264 install -D -m644 misc/dist/shell/%{name}.bash-completion \
265 %{buildroot}%{_datadir}/bash-completion/completions/%{name}
266 install -D -m644 misc/dist/shell/%{name}.fish \
267 %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
268 install -D -m644 misc/dist/shell/_%{name}.zsh-completion \
269 %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
270
271 %check
272 # Validate desktop and appdata files
273 desktop-file-validate %{buildroot}%{_datadir}/applications/%{rdnsname}.desktop
274 appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{rdnsname}.appdata.xml

  ViewVC Help
Powered by ViewVC 1.1.30