id: org.telegram.desktop runtime: org.gnome.Platform runtime-version: '48' sdk: org.gnome.Sdk command: Telegram finish-args: - --share=ipc - --share=network - --socket=wayland - --socket=fallback-x11 - --socket=pulseaudio - --device=all - --talk-name=org.freedesktop.Notifications - --talk-name=org.gnome.Mutter.IdleMonitor - --talk-name=org.kde.StatusNotifierWatcher - --talk-name=com.canonical.AppMenu.Registrar - --talk-name=com.canonical.indicator.application - --talk-name=org.ayatana.indicator.application - --talk-name=org.sigxcpu.Feedback - --unset-env=QT_PLUGIN_PATH sdk-extensions: - org.freedesktop.Sdk.Extension.llvm20 add-extensions: org.freedesktop.Platform.ffmpeg-full: directory: lib/ffmpeg add-ld-path: . version: '24.08' autodownload: true autodelete: false cleanup-commands: - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg build-options: append-path: /usr/lib/sdk/llvm20/bin append-ld-library-path: /usr/lib/sdk/llvm20/lib ldflags: -fuse-ld=lld -lhwy env: CMAKE_BUILD_TYPE: None CMAKE_PREFIX_PATH: /app arch: aarch64: cflags: -g1 cxxflags: -g1 modules: - name: pkg-config buildsystem: simple build-commands: - install -d $FLATPAK_DEST/bin - | cat < $FLATPAK_DEST/bin/pkg-config #!/bin/sh unset PKG_CONFIG_ALLOW_SYSTEM_LIBS exec /usr/bin/pkg-config "\$@" EOF - chmod +x $FLATPAK_DEST/bin/pkg-config cleanup: - '*' - name: implib buildsystem: simple build-commands: - | install -d $FLATPAK_DEST/lib mkdir build cd build implib() { LIBFILE=$(basename $1) LIBNAME=$(basename $1 .so) ../implib-gen.py -q $1 gcc $CFLAGS -c -o $LIBFILE.tramp.o $LIBFILE.tramp.S gcc $CFLAGS -c -o $LIBFILE.init.o $LIBFILE.init.c ar rcs $FLATPAK_DEST/lib/$LIBNAME.a $LIBFILE.tramp.o $LIBFILE.init.o } implib /usr/lib/$FLATPAK_ARCH-linux-gnu/libgtk-3.so implib /usr/lib/$FLATPAK_ARCH-linux-gnu/libgdk-3.so sources: - type: git url: https://github.com/yugr/Implib.so.git commit: ecf7bb51a92a0fb16834c5b698570ab25f9f1d21 cleanup: - '*' - name: jinja2 buildsystem: simple build-commands: - pip3 install --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} flit-core --no-build-isolation - pip3 install --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "Jinja2" --no-build-isolation sources: - type: file url: https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz sha256: 18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2 x-checker-data: type: pypi name: flit-core - type: file url: https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz sha256: 722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698 x-checker-data: type: pypi name: MarkupSafe - type: file url: https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz sha256: 0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d x-checker-data: type: pypi name: Jinja2 cleanup: - '*' - name: systemd buildsystem: meson builddir: true config-opts: - --buildtype=plain make-args: - systemd-detect-virt no-make-install: true post-install: - install -d "$FLATPAK_DEST/bin" - install -D systemd-detect-virt "$FLATPAK_DEST/bin" sources: - type: git url: https://github.com/systemd/systemd.git commit: 67a1069b7269cc23c3d04a2fb0cf110abe7abf31 tag: v258.1 x-checker-data: type: json url: https://api.github.com/repos/systemd/systemd/releases/latest tag-query: .tag_name timestamp-query: .published_at version-query: $tag | sub("^[vV]"; "") - type: shell commands: - >- sed -i "s/'link_with' : libshared/'link_with' : [libshared_static, libsystemd_static, libbasic_static]/" meson.build - name: boost buildsystem: simple build-commands: - ./bootstrap.sh --prefix=${FLATPAK_DEST} --with-libraries=regex - ./b2 variant=release link=static runtime-link=shared cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" -j $FLATPAK_BUILDER_N_JOBS install sources: - type: archive url: https://archives.boost.io/release/1.89.0/source/boost_1_89_0.tar.bz2 sha256: 85a33fa22621b4f314f8e85e1a5e2a9363d22e4f4992925d4bb3bc631b5a0c7a x-checker-data: type: anitya project-id: 6845 stable-only: true url-template: https://archives.boost.io/release/$version/source/boost_${major}_${minor}_${patch}.tar.bz2 cleanup: - '*' - name: ada buildsystem: cmake-ninja builddir: true config-opts: - -DBUILD_TESTING=OFF - -DADA_TOOLS=OFF sources: - type: git url: https://github.com/ada-url/ada.git commit: 9c0370e26b9f9ac1c07c91c5bd7301fc3aaf8794 tag: v3.3.0 x-checker-data: type: json url: https://api.github.com/repos/ada-url/ada/releases/latest tag-query: .tag_name timestamp-query: .published_at version-query: $tag | sub("^[vV]"; "") cleanup: - '*' - name: protobuf buildsystem: cmake-ninja builddir: true config-opts: - -Dprotobuf_BUILD_TESTS=OFF sources: - type: git url: https://github.com/protocolbuffers/protobuf.git commit: a79f2d2e9fadd75e94f3fe40a0399bf0a5d90551 tag: v33.0 x-checker-data: type: json url: https://api.github.com/repos/protocolbuffers/protobuf/releases/latest tag-query: .tag_name timestamp-query: .published_at version-query: $tag | sub("^[vV]"; "") cleanup: - '*' - name: jpegli buildsystem: cmake-ninja builddir: true no-make-install: true config-opts: - -DBUILD_TESTING=OFF - -DJPEGXL_ENABLE_DEVTOOLS=OFF - -DJPEGXL_ENABLE_TOOLS=OFF - -DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON - -DJPEGXL_ENABLE_DOXYGEN=OFF - -DJPEGXL_ENABLE_MANPAGES=OFF - -DJPEGXL_ENABLE_BENCHMARK=OFF - -DJPEGXL_ENABLE_EXAMPLES=OFF - -DJPEGXL_ENABLE_JNI=OFF - -DJPEGXL_ENABLE_SJPEG=OFF - -DJPEGXL_ENABLE_OPENEXR=OFF - -DJPEGXL_ENABLE_SKCMS=OFF - -DJPEGXL_FORCE_SYSTEM_BROTLI=ON - -DJPEGXL_FORCE_SYSTEM_LCMS2=ON - -DJPEGXL_FORCE_SYSTEM_HWY=ON post-install: - cp "$FLATPAK_BUILDER_BUILDDIR"/_flatpak_build/lib/libjpegli-static.a "$FLATPAK_DEST"/lib/libjpeg.a - ar rcs "$FLATPAK_DEST"/lib/libjpeg.a "$FLATPAK_BUILDER_BUILDDIR"/_flatpak_build/lib/CMakeFiles/jpegli-libjpeg-obj.dir/jpegli/libjpeg_wrapper.cc.o sources: - type: git url: https://github.com/libjxl/libjxl.git commit: 794a5dcf0d54f9f0b20d288a12e87afb91d20dfc tag: v0.11.1 x-checker-data: type: json url: https://api.github.com/repos/libjxl/libjxl/releases/latest tag-query: .tag_name timestamp-query: .published_at version-query: $tag | sub("^[vV]"; "") cleanup: - '*' - name: libde265 buildsystem: cmake-ninja config-opts: - -DBUILD_SHARED_LIBS=OFF - -DENABLE_SDL=OFF sources: - type: archive url: https://github.com/strukturag/libde265/releases/download/v1.0.16/libde265-1.0.16.tar.gz sha256: b92beb6b53c346db9a8fae968d686ab706240099cdd5aff87777362d668b0de7 x-checker-data: type: json url: https://api.github.com/repos/strukturag/libde265/releases/latest tag-query: .tag_name timestamp-query: .published_at version-query: $tag | sub("^[vV]"; "") url-query: '"https://github.com/strukturag/libde265/releases/download/\($tag)/libde265-\($version).tar.gz"' cleanup: - '*' - name: libheif buildsystem: cmake-ninja builddir: true config-opts: - -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON - -DBUILD_SHARED_LIBS=OFF - -DBUILD_TESTING=OFF - -DWITH_FFMPEG_DECODER=ON - -DWITH_EXAMPLES=OFF sources: - type: archive url: https://github.com/strukturag/libheif/releases/download/v1.20.2/libheif-1.20.2.tar.gz sha256: 68ac9084243004e0ef3633f184eeae85d615fe7e4444373a0a21cebccae9d12a x-checker-data: type: json url: https://api.github.com/repos/strukturag/libheif/releases/latest tag-query: .tag_name timestamp-query: .published_at version-query: $tag | sub("^[vV]"; "") url-query: '"https://github.com/strukturag/libheif/releases/download/\($tag)/libheif-\($version).tar.gz"' cleanup: - '*' - name: rnnoise config-opts: - --disable-shared - --disable-examples - --disable-doc sources: - type: archive url: https://github.com/xiph/rnnoise/releases/download/v0.2/rnnoise-0.2.tar.gz sha256: 90fce4b00b9ff24c08dbfe31b82ffd43bae383d85c5535676d28b0a2b11c0d37 x-checker-data: type: json url: https://api.github.com/repos/xiph/rnnoise/releases/latest tag-query: .tag_name timestamp-query: .published_at version-query: $tag | sub("^[vV]"; "") url-query: '"https://github.com/xiph/rnnoise/releases/download/\($tag)/rnnoise-\($version).tar.gz"' - type: shell commands: - sed -i 's/os_support.h/common.h/g;s/OPUS_CLEAR/RNN_CLEAR/g' src/vec{,_neon}.h cleanup: - '*' - name: qt buildsystem: cmake-ninja builddir: true config-opts: - -DBUILD_SHARED_LIBS=OFF - -DQT_BUILD_SUBMODULES=qtbase;qtdeclarative;qtimageformats;qtshadertools;qtsvg;qtwayland - -DQT_QPA_PLATFORMS=wayland;xcb - -DFEATURE_copy_file_range=OFF - -DINPUT_openssl=linked sources: - type: archive url: https://download.qt.io/archive/qt/6.10/6.10.0/single/qt-everywhere-src-6.10.0.tar.xz sha256: 81895fb038a9c3d6c6f698d7611339a189eb45c3d91746c7789b0b77a5981aa3 x-checker-data: type: anitya project-id: 7927 url-template: https://download.qt.io/archive/qt/$major.$minor/$version/single/qt-everywhere-src-$version.tar.xz - qtbase.json - qtwayland.json cleanup: - '*' - name: tg_owt buildsystem: cmake-ninja builddir: true sources: - type: git url: https://github.com/desktop-app/tg_owt.git commit: 5c5c71258777d0196dbb3a09cc37d2f56ead28ab x-checker-data: type: json parent-id: tdesktop-git-0 commit-data-url: >- "https://github.com/telegramdesktop/tdesktop/raw/\($parent.new.tag//$parent.current.tag)/snap/snapcraft.yaml" commit-query: >- .parts.webrtc."source-commit" version-data-url: >- "https://api.github.com/repos/desktop-app/tg_owt/commits/\($commit)" version-query: >- "desktop-app/tg_owt@\(.sha[0:7])" timestamp-data-url: >- "https://api.github.com/repos/desktop-app/tg_owt/commits/\($commit)" timestamp-query: >- .commit.committer.date - type: shell commands: - sed -i '/pkg_check_modules(SRTP libsrtp2)/d' cmake/external.cmake cleanup: - '*' - name: tde2e buildsystem: cmake-ninja builddir: true config-opts: - -DTD_E2E_ONLY=ON sources: - type: git url: https://github.com/tdlib/td.git commit: 51743dfd01dff6179e2d8f7095729caa4e2222e9 x-checker-data: type: json parent-id: tdesktop-git-0 commit-data-url: >- "https://github.com/telegramdesktop/tdesktop/raw/\($parent.new.tag//$parent.current.tag)/snap/snapcraft.yaml" commit-query: >- .parts.tde2e."source-commit" version-data-url: >- "https://api.github.com/repos/tdlib/td/commits/\($commit)" version-query: >- "tdlib/td@\(.sha[0:7])" timestamp-data-url: >- "https://api.github.com/repos/tdlib/td/commits/\($commit)" timestamp-query: >- .commit.committer.date cleanup: - '*' - name: tdesktop buildsystem: cmake-ninja builddir: true config-opts: - -DTDESKTOP_API_ID=611335 - -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c sources: - type: git url: https://github.com/telegramdesktop/tdesktop.git commit: a71c24f803722f8cdb991f19ea8a539fdcb05a23 tag: v6.2.4 x-checker-data: type: json url: https://api.github.com/repos/telegramdesktop/tdesktop/releases tag-query: first | .tag_name timestamp-query: first | .published_at version-query: $tag | sub("^[vV]"; "") - type: shell commands: - sed -i '/-Werror/d' Telegram/ThirdParty/dispatch/cmake/modules/DispatchCompilerWarnings.cmake