Path: blob/master/scripts/packaging/flatpak/org.duckstation.DuckStation.yaml
4251 views
# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <[email protected]>1# SPDX-License-Identifier: CC-BY-NC-ND-4.023app-id: "org.duckstation.DuckStation"4runtime: "org.kde.Platform"5runtime-version: "6.9"6sdk: "org.kde.Sdk"7sdk-extensions:8- "org.freedesktop.Sdk.Extension.llvm19"910command: "duckstation-qt"1112finish-args:13- "--device=all"14- "--allow=bluetooth"15- "--share=network"16- "--share=ipc"17- "--socket=pulseaudio"18- "--talk-name=org.freedesktop.ScreenSaver"19- "--socket=wayland"20- "--socket=fallback-x11"2122modules:23# Dependencies.24- name: duckstation-deps25buildsystem: simple26sources:27- type: file28path: ../../deps/build-dependencies-linux.sh29- type: file30path: ../../deps/versions31build-options:32# Don't need debug info for deps, match AppImage.33strip: true34no-debuginfo: true3536# Prevent flatpak defaults of fortify etc from creeping in.37cflags: ""38cflags-override: true39cxxflags: ""40cxxflags-override: true4142# Need network access to download sources.43build-args:44- "--share=network"45build-commands:46- "./build-dependencies-linux.sh -system-freetype -system-harfbuzz -system-libjpeg -system-libpng -system-libwebp -system-zlib -system-zstd -system-qt /app/deps"47cleanup:48- "*"4950# Main module.51- name: duckstation52buildsystem: cmake-ninja53builddir: true54build-options:55# Preserve debug information, it is needed for backtraces.56strip: false57no-debuginfo: true5859# Prevent flatpak defaults of fortify etc from creeping in.60cflags: ""61cflags-override: true62cxxflags: ""63cxxflags-override: true6465config-opts:66# Flatpak build does not appear to default to Release.67- "-DCMAKE_BUILD_TYPE=Release"6869# Dependencies path.70- "-DCMAKE_PREFIX_PATH=/app/deps"7172# Self-contained install, need to change the directory.73# Typical flatpak garbage makes it a pain to change the path from /app/bin...74- "-DCMAKE_INSTALL_PREFIX=/app/bin"75- "-DALLOW_INSTALL=ON"7677# We're not running tests as part of the flatpak build.78- "-DBUILD_TESTS=OFF"7980# Set the page range to 4K-16K. This has no effect on X86, but is required for81# ARM builds, as some devices are now shipping with 16K kernels.82- "-DHOST_MIN_PAGE_SIZE=4096"83- "-DHOST_MAX_PAGE_SIZE=16384"8485# Make sure we're using ThinLTO.86- "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"87- "-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm19/bin/clang"88- "-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm19/bin/clang++"89- "-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld"90- "-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld"91- "-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld"92sources:93- type: dir94path: ../../..9596post-install:97# Manually copy desktop file/metadata, it's not done as part of the regular build.98- >-99install -Dm644100"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/org.duckstation.DuckStation.png"101"${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/org.duckstation.DuckStation.png"102- >-103install -Dm644104"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/org.duckstation.DuckStation.desktop"105"${FLATPAK_DEST}/share/applications/org.duckstation.DuckStation.desktop"106- >-107install -Dm644108"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/flatpak/org.duckstation.DuckStation.metainfo.xml"109"${FLATPAK_DEST}/share/metainfo/org.duckstation.DuckStation.metainfo.xml"110111112113