# Flatpak manifest for VitaPlex (borealis + libmpv Plex client). # # The libmpv module stack (libmpv + libplacebo + libass + uchardet + # libdisplay-info + libXpresent) is lifted from Switchfin's Flathub manifest # (fun.dragonfly.switchfin) — VitaPlex is built on the same borealis + libmpv # stack, so those modules apply almost verbatim. # # STATUS: first cut, iterated via CI. Known follow-ups before this is # Flathub-ready: # * The vitaplex module builds with --share=network because VitaPlex's CMake # FetchContents GLFW/deps at configure time. Flathub forbids build-time # network, so those sources must be vendored as flatpak modules/sources. # * The app source is `type: dir` (build the local checkout, for the CI # bundle). For Flathub, switch it to `type: git` pinned to a release commit. app-id: io.github.breezyslasher.VitaPlex runtime: org.freedesktop.Platform runtime-version: '24.08' sdk: org.freedesktop.Sdk command: VitaPlex finish-args: - --share=ipc - --socket=fallback-x11 - --socket=wayland # Designed for a controller. - --device=all # Talks to Plex servers over the network. - --share=network - --socket=pulseaudio # MPRIS media controls. Flatpak's default session-bus policy lets an app own # org.mpris.MediaPlayer2.$FLATPAK_ID and nothing else, and the bus name here # is org.mpris.MediaPlayer2.vitaplex — outside that, so requesting it fails # and the Flatpak build has no media controls at all. Naming it explicitly is # the documented way to keep a name that does not match the app id. - --own-name=org.mpris.MediaPlayer2.vitaplex # Keep the screen from blanking during playback. The inhibit call goes to # org.freedesktop.ScreenSaver, which is not in the default policy either, so # without this the display sleeps mid-film inside the sandbox. - --talk-name=org.freedesktop.ScreenSaver # Desktop notifications (download finished) and the launcher progress bar. - --talk-name=org.freedesktop.Notifications - --talk-name=com.canonical.Unity cleanup: - '*.a' - '*.la' - /include - /lib/cmake - /lib/pkgconfig - /man - /share/man - /share/gtk-doc modules: # mbedTLS — VitaPlex's HTTP client links it, and it isn't in the runtime. - name: mbedtls buildsystem: cmake-ninja config-opts: - -DCMAKE_BUILD_TYPE=Release - -DUSE_SHARED_MBEDTLS_LIBRARY=ON - -DUSE_STATIC_MBEDTLS_LIBRARY=OFF - -DENABLE_TESTING=OFF - -DENABLE_PROGRAMS=OFF sources: - type: archive url: https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.2/mbedtls-3.6.2.tar.bz2 sha256: 8b54fb9bcf4d5a7078028e0520acddefb7900b3e66fec7f7175bb5b7d85ccdca - name: libmpv buildsystem: meson config-opts: - --buildtype=release - -Dlibmpv=true - -Dcplayer=false - -Dtests=false - -Dlibarchive=disabled - -Dmanpage-build=disabled - -Dlua=disabled - -Dvulkan=disabled sources: - type: archive url: https://github.com/mpv-player/mpv/archive/v0.41.0.tar.gz sha256: ee21092a5ee427353392360929dc64645c54479aefdb5babc5cfbb5fad626209 modules: - name: libXpresent buildsystem: autotools sources: - type: archive url: https://xorg.freedesktop.org/archive/individual/lib/libXpresent-1.0.2.tar.xz sha256: 4e5b21b4812206a4b223013606ae31170502c1043038777a1ef8f70c09d37602 - name: libdisplay-info cleanup: - /bin buildsystem: meson sources: - type: archive url: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/releases/0.3.0/downloads/libdisplay-info-0.3.0.tar.xz sha256: 6ae77cd937f9cf7d1321d35c116062c4911e8447010a6a713ac4286f7a9d5987 modules: - name: hwdata cleanup: - '*' config-opts: - --disable-blacklist sources: - type: archive url: https://github.com/vcrhonek/hwdata/archive/v0.409.tar.gz sha256: 23006accc0f931dd5187d0307a57d0744e2b8feb85e73c37bc0f5229fb31eadd - name: libplacebo buildsystem: meson config-opts: - -Dglslang=disabled - -Ddemos=false - -Ddovi=enabled - -Dlcms=disabled - -Dvulkan=disabled sources: - type: git url: https://github.com/haasn/libplacebo.git tag: v7.360.1 commit: cee9b076f2c63104ccfd497fa79c39a867293ec4 - name: libass config-opts: - --disable-static sources: - type: archive url: https://github.com/libass/libass/releases/download/0.17.5/libass-0.17.5.tar.xz sha256: 2dca25c0e0c837ddf00b52011b3f82cac1e4ddd3ad018227806b0c2288864acc - name: uchardet buildsystem: cmake-ninja config-opts: - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - -DCMAKE_BUILD_TYPE=Release - -DBUILD_STATIC=0 cleanup: - /bin sources: - type: archive url: https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.8.tar.xz sha256: e97a60cfc00a1c147a674b097bb1422abd9fa78a2d9ce3f3fdcc2e78a34ac5f0 - name: vitaplex buildsystem: cmake-ninja builddir: true # No install() rules in VitaPlex's CMake — install by hand below, mirroring # the .deb layout (binary in /app/lib, resources in /app/share, a launcher # in /app/bin that cd's to the resources dir since RESOURCE_PREFIX is the # relative "resources/"). no-make-install: true build-options: # VitaPlex's CMake FetchContents GLFW/deps at configure time. Not # Flathub-legal (see header); fine for the CI bundle build. build-args: - --share=network config-opts: - -DCMAKE_BUILD_TYPE=Release - -DPLATFORM_DESKTOP=ON build-commands: - install -Dm755 VitaPlex ${FLATPAK_DEST}/lib/VitaPlex/VitaPlex # cp won't create intermediate dirs; make the parent first. - install -d ${FLATPAK_DEST}/share/VitaPlex - cp -r resources ${FLATPAK_DEST}/share/VitaPlex/resources - | install -d ${FLATPAK_DEST}/bin printf '%s\n' '#!/bin/sh' \ 'cd /app/share/VitaPlex || exit 1' \ 'exec /app/lib/VitaPlex/VitaPlex "$@"' > ${FLATPAK_DEST}/bin/VitaPlex chmod 755 ${FLATPAK_DEST}/bin/VitaPlex - install -Dm644 ../flatpak/io.github.breezyslasher.VitaPlex.desktop ${FLATPAK_DEST}/share/applications/io.github.breezyslasher.VitaPlex.desktop - install -Dm644 ../flatpak/io.github.breezyslasher.VitaPlex.metainfo.xml ${FLATPAK_DEST}/share/metainfo/io.github.breezyslasher.VitaPlex.metainfo.xml - install -Dm644 ../app/platform/icon_desktop.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/io.github.breezyslasher.VitaPlex.png sources: - type: dir path: ..