Sophie

Sophie

distrib > Mageia > 6 > i586 > media > core-backports-src > by-pkgid > 045801f9233efdc0d6faf3cd353cf466 > files > 3

godot3-3.0.6-1.mga6.src.rpm

%bcond_without  server

%define uname   godot
%define status  stable
%define uversion %{version}-%{status}

Name:           godot3
Version:        3.0.6
Release:        %mkrel 1
Summary:        Multi-platform 2D and 3D game engine with a feature-rich editor
Group:          Development/Tools
# 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 Fonts Copyright and ISC and MPLv2.0
URL:            https://godotengine.org
Source0:        https://github.com/godotengine/godot/archive/%{uversion}/%{uname}-%{uversion}.tar.gz

# Mageia patch for "godot3" backport name
Patch10:        godot-3.0.2-rename-to-godot3.patch

BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(libpcre2-32)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(libwebp)
BuildRequires:  pkgconfig(ogg)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(opus)
BuildRequires:  pkgconfig(opusfile)
BuildRequires:  pkgconfig(theora)
BuildRequires:  pkgconfig(vorbis)
BuildRequires:  pkgconfig(vorbisfile)
BuildRequires:  pkgconfig(vpx)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  scons

# Bundled libraries: many of the libraries code in `thirdparty` can be
# unbundled when the libraries are provided by the system. Keep in mind
# though that the `thirdparty` folder also contains code which is typically
# not packaged in distros, and is probably best left bundled.

# Git commit slightly newer than 2.87
# Can be unbundled if bullet 2.88+ is available
Provides:       bundled(bullet) = 2.87
# Has some modifications for IPv6 support, upstream enet is unresponsive
# Should not be unbundled.
Provides:       bundled(enet) = 1.3.13
# Upstream commit from 2016, newer than 1.0.0.27 which is last tag
# Could be unbundled if packaged.
# Godot upstream will soon deprecate this "libsimplewebm" module.
Provides:       bundled(libwebm)
# Has custom changes to support seeking in zip archives
# Should not be unbundled.
Provides:       bundled(minizip) = 1.2.4
# Could be unbundled if packaged.
Provides:       bundled(nanosvg)
# Could be unbundled if packaged.
Provides:       bundled(squish) = 1.15
# Can't be unbundled out-of-the-box as it uses experimental APIs available
# only to static linking. They're not critical features though and could
# maybe be patched away to link against a shared zstd.
Provides:       bundled(zstd) = 1.3.3

%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 DONORS.md README.md
%license AUTHORS.md COPYRIGHT.txt LICENSE.txt LOGO_LICENSE.md
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/metainfo/%{name}.appdata.xml
%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
%{_mandir}/man6/%{name}.6*

#----------------------------------------------------------------------

%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
%license AUTHORS.md COPYRIGHT.txt LICENSE.txt
%{_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
%license AUTHORS.md COPYRIGHT.txt LICENSE.txt
%{_bindir}/%{name}-runner

#----------------------------------------------------------------------

%prep
%autosetup -p1 -n %{uname}-%{uversion}

# 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}" LINKFLAGS="%{ldflags}" $system_libs udev=yes progress=no

export BUILD_NAME="%{_real_vendor}"

# 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 -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 server}
install -m755 bin/%{uname}_server.server.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-server
%endif

install -D -m644 icon.svg \
    %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
install -D -m644 misc/dist/linux/%{uname}.desktop \
    %{buildroot}%{_datadir}/applications/%{name}.desktop
install -D -m644 misc/dist/linux/%{uname}.appdata.xml \
    %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
install -D -m644 misc/dist/linux/%{uname}.6 \
    %{buildroot}%{_mandir}/man6/%{name}.6


%changelog
* Sat Aug 11 2018 akien <akien> 3.0.6-1.mga6
  (not released yet)
+ Revision: 1251043
- Version 3.0.6 (security update)
- Version 3.0.5
- Install binary and dist files as 'godot3'
- Rename spec to godot3
- Rename godot backport to godot3, incompatible with Core Release godot
- Backport Godot 3 to Mageia 6
- Add upstream patch to fix server platform build
- Version 3.0.2-stable

* Fri Feb 02 2018 akien <akien> 3.0-3.mga7
+ Revision: 1198620
- Update tarball to final 3.0-stable

* Fri Feb 02 2018 daviddavid <daviddavid> 3.0-2.mga7
+ Revision: 1198552
- rebuild for new libvpx 1.7.0

* Fri Jan 26 2018 akien <akien> 3.0-1.mga7
+ Revision: 1197290
- Disable LTO, seems to break debuginfo
- New upstream tarball with fixed debuginfo stripping
- Prevent stripping binaries
- Don't unbundle zstd yet as Godot uses experimental APIs exposed only in the static library
- Keep bundled bullet, needs >= 2.88 which is not released yet
- Version 3.0-stable
- No longer provide demos, they can be downloaded from the editor
- Disable server binary, not available in 3.0
- Compile with GCC and LTO
- Document bundled() provides thoroughly
- Document bundled() provides

* Sun Dec 03 2017 daviddavid <daviddavid> 2.1.4-4.mga7
+ Revision: 1180794
- rebuild for new glew 2.1.0

* Sun Sep 24 2017 akien <akien> 2.1.4-3.mga7
+ Revision: 1158526
- Add upstream patches to improve packaging:
  * P0: OpenSSL 1.1.0 support, adjust BRs accordingly
  * P1: Upstream desktop and AppStream files
  * P2: Help output improvements
  * P3: Upstream man page
- Add license files to server package
- Remove ExclusiveArch, should be possible to build on ARMv7
- Clarify why clang and openssl-compat10 are used
- Package doc for demos

* Sat Sep 23 2017 akien <akien> 2.1.4-2.mga7
+ Revision: 1157793
- Add debug_release symbols
- Enable udev support for joypads
- Package COPYRIGHT.txt and AUTHORS.md in docs

* Mon Sep 11 2017 guillomovitch <guillomovitch> 2.1.4-1.mga7
+ Revision: 1152942
- new version 2.1.4
- use llvm, as gcc 7 is not supported upstream

* Tue Apr 11 2017 akien <akien> 2.1.3-1.mga6
+ Revision: 1096424
- Version 2.1.3

* Sat Jan 21 2017 akien <akien> 2.1.2-1.mga6
+ Revision: 1082732
- Version 2.1.2-stable

* Wed Nov 16 2016 akien <akien> 2.1.1-1.mga6
+ Revision: 1067563
- Version 2.1.1
- Unbundle libraries thanks to upstream work to facilitate this:
  freetype, glew, libogg, libpng, libtheora, libvorbis, libwebp, openssl, opus, zlib
- Drop packaged templates for x11 32-bit and 64-bit
  o It was too much work for building templates just for Linux, and 32-bit systems
    would not have had access to the 64-bit templates anyway.
  o Godot 3.0 (next major) will let users download official templates directly,
    which is much better for the many supported platforms the Linux editor can
    export to.

* Tue Aug 09 2016 akien <akien> 2.1-1.mga6
+ Revision: 1045186
- Enable conditional server build, for testing purposes
- Sync new 2.1 tarball
- Add tarball for demos, provided separately upstream
- Version 2.1
  o BRs xrandr for dpi detection
  o No longer links statically against stdc++-static

* Sun Jul 10 2016 akien <akien> 2.0.4.1-1.mga6
+ Revision: 1040624
- Version 2.0.4.1, hotfix for a regression
- Version 2.0.4

* Thu Jun 16 2016 akien <akien> 2.0.3-4.mga6
+ Revision: 1021639
- Fix Comment in desktop file
- Force starting the project manager in the desktop file

* Tue May 17 2016 akien <akien> 2.0.3-3.mga6
+ Revision: 1016575
- Resync tarball with upstream, makes Patch0 obsolete

* Fri May 13 2016 akien <akien> 2.0.3-2.mga6
+ Revision: 1014571
- Patch upstream regression in ItemList

* Fri May 13 2016 akien <akien> 2.0.3-1.mga6
+ Revision: 1014421
- Version 2.0.3
- No longer compress templates with upx

* Tue Mar 08 2016 akien <akien> 2.0.1-1.mga6
+ Revision: 987284
- Version 2.0.1

* Wed Mar 02 2016 umeabot <umeabot> 2.0-3.mga6
+ Revision: 983443
- Rebuild for openssl

* Sat Feb 27 2016 akien <akien> 2.0-2.mga6
+ Revision: 979993
- Install demos (in a separate package)
- Set build revision to mageia instead of custom_build
- Use Mageia optflags and linkflags for builds (apart from debug template, no optflags)

* Tue Feb 23 2016 akien <akien> 2.0-1.mga6
+ Revision: 977125
- Version 2.0-stable

* Sun Feb 21 2016 akien <akien> 2.0-0.dev.1.mga6
+ Revision: 975107
- imported package godot