mirror of
https://abf.rosa.ru/djam/godot.git
synced 2025-02-23 18:12:54 +00:00
176 lines
5.5 KiB
RPMSpec
176 lines
5.5 KiB
RPMSpec
%global optflags %(echo %{optflags} | sed -e 's/-ffat-lto-objects//g' -e 's/-fvar-tracking-assignments//g')
|
|
%bcond_without server
|
|
|
|
%define status stable
|
|
%define uversion %{version}-%{status}
|
|
|
|
%define dversion 3.3-2ce76ff
|
|
|
|
%ifarch %{ix86}
|
|
%define arch 32
|
|
%else
|
|
%define arch 64
|
|
%endif
|
|
|
|
Summary: Multi-platform 2D and 3D game engine with a feature rich editor
|
|
Name: godot
|
|
Version: 3.3.2
|
|
Release: 1
|
|
License: MIT
|
|
Group: Games/Other
|
|
Url: https://godotengine.org
|
|
Source0: https://github.com/godotengine/godot/archive/%{uversion}/%{name}-%{uversion}.tar.gz
|
|
Source1: https://github.com/godotengine/godot-demo-projects/archive/%{dversion}/godot-demo-projects-%{dversion}.tar.gz
|
|
# Upstream fix for https://github.com/godotengine/godot/issues/17245
|
|
Patch0: 0001-SCons-Fix-linking-system-pcre2-on-server-platform.patch
|
|
# Upstream fix
|
|
Patch1: 0001-Dist-Fix-Linux-desktop-file-launch-argument.patch
|
|
BuildRequires: scons
|
|
BuildRequires: clang
|
|
BuildRequires: llvm
|
|
BuildRequires: pkgconfig(alsa)
|
|
BuildRequires: pkgconfig(freetype2)
|
|
BuildRequires: pkgconfig(glew)
|
|
BuildRequires: pkgconfig(libpng)
|
|
BuildRequires: pkgconfig(libpcre2-32)
|
|
BuildRequires: pkgconfig(libpulse)
|
|
BuildRequires: pkgconfig(libwebp)
|
|
BuildRequires: pkgconfig(ogg)
|
|
BuildRequires: pkgconfig(openssl)
|
|
BuildRequires: pkgconfig(opus)
|
|
BuildRequires: pkgconfig(opusfile)
|
|
BuildRequires: pkgconfig(theora)
|
|
BuildRequires: pkgconfig(udev)
|
|
BuildRequires: pkgconfig(vorbis)
|
|
BuildRequires: pkgconfig(vorbisfile)
|
|
BuildRequires: pkgconfig(vpx)
|
|
BuildRequires: pkgconfig(x11)
|
|
BuildRequires: pkgconfig(xcursor)
|
|
BuildRequires: pkgconfig(xinerama)
|
|
BuildRequires: pkgconfig(xrandr)
|
|
BuildRequires: pkgconfig(zlib)
|
|
BuildRequires: %{_lib}atomic-static-devel
|
|
BuildRequires: stdc++-gcc10-devel
|
|
Suggests: %{name}-demos
|
|
|
|
%description
|
|
Godot 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.
|
|
|
|
Godot is completely free and open source under the very permissive MIT
|
|
license. No strings attached, no royalties, nothing. Your game is yours,
|
|
down to the last line of engine code.
|
|
|
|
%files
|
|
%doc LICENSE.txt README.md
|
|
%{_appdatadir}/godot.appdata.xml
|
|
%{_bindir}/%{name}
|
|
%dir %{_datadir}/%{name}
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_mandir}/man6/godot.6*
|
|
%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
%package demos
|
|
Summary: Demo projects to learn how to use Godot Engine
|
|
Group: Games/Other
|
|
BuildArch: noarch
|
|
|
|
%description demos
|
|
This package contains the official demo projects to help new users to learn
|
|
the features of the game engine.
|
|
|
|
%files demos
|
|
%doc godot-demo-projects-%{dversion}/*.md
|
|
%{_datadir}/%{name}/demos/
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
%if %{with server}
|
|
%package server
|
|
Summary: Godot headless binary for servers
|
|
Group: Games/Other
|
|
|
|
%description server
|
|
This package contains the headless binary for the Godot game engine,
|
|
particularly suited for running dedicated servers.
|
|
|
|
%files server
|
|
%doc *.md
|
|
%{_bindir}/%{name}-server
|
|
%endif
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
%package runner
|
|
Summary: Shared binary to play games developed with the Godot engine
|
|
Group: Games/Other
|
|
|
|
%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.
|
|
|
|
%files runner
|
|
%doc LICENSE.txt README.md
|
|
%{_bindir}/%{name}-runner
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -qn %{name}-%{uversion} -a 1
|
|
#patch0 -p1
|
|
#patch1 -p1
|
|
|
|
# Windows-specific
|
|
rm -rf thirdparty/rtaudio
|
|
|
|
%build
|
|
# Needs to be in %%build so that system_libs stays in scope
|
|
# We don't unbundle enet and minizip as they have necessary custom changes
|
|
# We don't unbundle bullet yet as it needs a version newer than 2.87 (current stable)
|
|
# We don't unbundle zstd yet as it's using experimental APIs available only with static linking
|
|
to_unbundle="freetype libogg libpng libtheora libvorbis libvpx libwebp openssl opus pcre2 zlib"
|
|
|
|
system_libs=""
|
|
for lib in $to_unbundle; do
|
|
system_libs+="builtin_"$lib"=no "
|
|
rm -rf thirdparty/$lib
|
|
done
|
|
%define _scons %scons CCFLAGS="%{optflags} -I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host}" LINKFLAGS="%{ldflags} -lstdc++-gcc10" CC=clang CXX=clang++ $system_libs
|
|
|
|
export BUILD_REVISION="RosaLinuxRo"
|
|
|
|
# Build graphical editor (tools)
|
|
%_scons p=x11 tools=yes target=release_debug
|
|
|
|
# Build game runner (without tools)
|
|
%_scons p=x11 tools=no target=release
|
|
|
|
%if %{with server}
|
|
# Build headless version of the editor
|
|
%_scons p=server tools=yes target=release_debug
|
|
%endif
|
|
|
|
%install
|
|
install -d %{buildroot}%{_bindir}
|
|
install -m0755 bin/%{name}.x11.opt.tools.%{arch} %{buildroot}%{_bindir}/%{name}
|
|
install -m0755 bin/%{name}.x11.opt.%{arch} %{buildroot}%{_bindir}/%{name}-runner
|
|
%if %{with server}
|
|
install -m0755 bin/%{name}_server.server.opt.tools.%{arch} %{buildroot}%{_bindir}/%{name}-server
|
|
%endif
|
|
|
|
install -d %{buildroot}%{_datadir}/%{name}
|
|
cp -a godot-demo-projects-%{dversion} %{buildroot}%{_datadir}/%{name}/demos
|
|
|
|
install -D -m644 icon.svg \
|
|
%{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
|
|
install -D -m644 misc/dist/linux/%{name}.desktop \
|
|
%{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
install -D -m644 misc/dist/linux/%{name}.appdata.xml \
|
|
%{buildroot}%{_appdatadir}/%{name}.appdata.xml
|
|
install -D -m644 misc/dist/linux/%{name}.6 \
|
|
%{buildroot}%{_mandir}/man6/%{name}.6
|
|
|