GODOT_ARCH=ppc64

abinfo "Building Godot export template for $GODOT_ARCH ..."

export BUILD_NAME=aosc

ARGV=(
    platform=linuxbsd
    target=template_release
    production=yes
    debug_symbols=yes
    arch="$GODOT_ARCH"
    module_mono_enabled=yes

    progress=no
    debug_paths_relative=yes
    engine_update_check=no
    builtin_certs=yes
    use_static_cpp=yes
)
scons ${ARGV[*]}

EXE_NAME="godot.linuxbsd.template_release.$GODOT_ARCH.mono"

abinfo "Installing export template for $GODOT_ARCH ..."
install -dv "$PKGDIR"/usr/lib/godot/templates/
install -Dvm755 "$SRCDIR"/bin/"$EXE_NAME" "$PKGDIR"/usr/lib/godot/templates/linux_release."$GODOT_ARCH"
