| 1 | # Flatpak manifest for Rusty Teams. BROKEN, see below: kept so the packaging matches the |
| 2 | # other Craft apps and so the sandbox work has a starting point. Not attached to releases. |
| 3 | # |
| 4 | # It repackages the prebuilt binary from package.sh's tarball (packaging/linux/flatpak-bundle.sh): |
| 5 | # libwebrtc is downloaded during the cargo build, which flatpak-builder's offline build does not |
| 6 | # allow, so there is no build-from-source manifest. |
| 7 | # |
| 8 | # Why it is broken: the Teams session runs in the user's own Chromium- or Firefox-based browser, |
| 9 | # which the app finds on the host and starts with a debug port (crates/browser, ADR 0003). Inside |
| 10 | # the sandbox the host's browsers are not visible and cannot be started without |
| 11 | # `flatpak-spawn --host` (needs --talk-name=org.freedesktop.Flatpak, granted below, and app code |
| 12 | # that uses it). Until then the app starts but cannot sign in. `--endpoint` to a browser started |
| 13 | # by hand on the host (`chromium --remote-debugging-port=9222`) works, since the network is shared. |
| 14 | # |
| 15 | # The app id must be reverse-DNS, so the desktop file and icon are renamed to it; the window's |
| 16 | # Wayland app id stays rusty-teams (StartupWMClass in the desktop file pairs them on X11). |
| 17 | id: io.github.danieldaeschle.RustyTeams |
| 18 | runtime: org.freedesktop.Platform |
| 19 | runtime-version: '26.08' |
| 20 | sdk: org.freedesktop.Sdk |
| 21 | command: teams |
| 22 | rename-desktop-file: rusty-teams.desktop |
| 23 | rename-icon: rusty-teams |
| 24 | finish-args: |
| 25 | # Display: Wayland first; X11 only when no Wayland compositor is running. |
| 26 | - --socket=wayland |
| 27 | - --socket=fallback-x11 |
| 28 | # X11 shared memory (MIT-SHM). |
| 29 | - --share=ipc |
| 30 | # Graph, the Teams services and the browser's debug port on 127.0.0.1. |
| 31 | - --share=network |
| 32 | # GPU for wgpu (Vulkan, or GL as a fallback) and cameras for video calls. |
| 33 | - --device=all |
| 34 | # Microphone and speakers for calls. |
| 35 | - --socket=pulseaudio |
| 36 | # Desktop toasts (ADR 0015) and the StatusNotifierItem tray icon. |
| 37 | - --talk-name=org.freedesktop.Notifications |
| 38 | - --talk-name=org.kde.StatusNotifierWatcher |
| 39 | # Starting the host's browser would go through flatpak-spawn --host (not implemented yet). |
| 40 | - --talk-name=org.freedesktop.Flatpak |
| 41 | # Downloaded files and attachments. |
| 42 | - --filesystem=xdg-download |
| 43 | build-options: |
| 44 | no-debuginfo: true |
| 45 | modules: |
| 46 | - name: rusty-teams |
| 47 | buildsystem: simple |
| 48 | build-commands: |
| 49 | - install -Dm755 bin/teams /app/bin/teams |
| 50 | - install -Dm644 share/applications/rusty-teams.desktop /app/share/applications/rusty-teams.desktop |
| 51 | # rename-desktop-file and rename-icon do not touch the metainfo: point it at the new names. |
| 52 | - >- |
| 53 | sed -e 's|<launchable type="desktop-id">rusty-teams.desktop<|<launchable type="desktop-id">io.github.danieldaeschle.RustyTeams.desktop<|' |
| 54 | -e 's|<icon type="stock">rusty-teams<|<icon type="stock">io.github.danieldaeschle.RustyTeams<|' |
| 55 | share/metainfo/io.github.danieldaeschle.RustyTeams.metainfo.xml |
| 56 | | install -Dm644 /dev/stdin /app/share/metainfo/io.github.danieldaeschle.RustyTeams.metainfo.xml |
| 57 | - mkdir -p /app/share/icons /app/share/doc && cp -R share/icons/hicolor /app/share/icons/ && cp -R share/doc/rusty-teams /app/share/doc/ |
| 58 | sources: |
| 59 | - type: dir |
| 60 | path: stage |