duckstation/scripts/packaging/flatpak/org.duckstation.DuckStation.yaml
Stenzek db80f6fbc5
CI/Flatpak: Disable ffmpeg support
So sick of dealing with fragmented bullshit because different packaging
systems and operating systems have different library versions.

Freedesktop SDK is stuck at ffmpeg 7.0, so it loses support.
2025-05-17 18:11:20 +10:00

92 lines
2.9 KiB
YAML

# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
app-id: "org.duckstation.DuckStation"
runtime: "org.kde.Platform"
runtime-version: "6.9"
sdk: "org.kde.Sdk"
sdk-extensions:
- "org.freedesktop.Sdk.Extension.llvm19"
command: "duckstation-qt"
finish-args:
- "--device=all"
- "--allow=bluetooth"
- "--share=network"
- "--share=ipc"
- "--socket=pulseaudio"
- "--talk-name=org.freedesktop.ScreenSaver"
- "--socket=wayland"
- "--socket=fallback-x11"
modules:
# Dependencies.
- "modules/10-libbacktrace.yaml"
- "modules/11-libzip.yaml"
- "modules/20-shaderc.yaml"
- "modules/21-spirv-cross.yaml"
- "modules/22-cpuinfo.yaml"
- "modules/23-discord-rpc.yaml"
- "modules/24-soundtouch.yaml"
- "modules/25-plutosvg.yaml"
- "modules/30-sdl3.yaml"
# Main module.
- name: duckstation
buildsystem: cmake-ninja
builddir: true
build-options:
# Preserve debug information, it is needed for backtraces.
strip: false
no-debuginfo: true
# Prevent flatpak defaults of fortify etc from creeping in.
cflags: ""
cflags-override: true
cxxflags: ""
cxxflags-override: true
config-opts:
# Flatpak build does not appear to default to Release.
- "-DCMAKE_BUILD_TYPE=Release"
# We're not running tests as part of the flatpak build.
- "-DBUILD_TESTS=OFF"
# Install to /app/bin, use /app/lib for dependencies.
- "-DALLOW_INSTALL=ON"
- "-DINSTALL_SELF_CONTAINED=OFF"
# Set the page range to 4K-16K. This has no effect on X86, but is required for
# ARM builds, as some devices are now shipping with 16K kernels.
- "-DHOST_MIN_PAGE_SIZE=4096"
- "-DHOST_MAX_PAGE_SIZE=16384"
# Make sure we're using ThinLTO.
- "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
- "-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm19/bin/clang"
- "-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm19/bin/clang++"
- "-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld"
- "-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld"
- "-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld"
sources:
- type: dir
path: ../../..
post-install:
# Manually copy desktop file/metadata, it's not done as part of the regular build.
- >-
install -Dm644
"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/org.duckstation.DuckStation.png"
"${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/org.duckstation.DuckStation.png"
- >-
install -Dm644
"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/org.duckstation.DuckStation.desktop"
"${FLATPAK_DEST}/share/applications/org.duckstation.DuckStation.desktop"
- >-
install -Dm644
"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/flatpak/org.duckstation.DuckStation.metainfo.xml"
"${FLATPAK_DEST}/share/metainfo/org.duckstation.DuckStation.metainfo.xml"