---
app-id: io.github.quodlibet.ExFalso
runtime: org.gnome.Platform
runtime-version: "3.34"
sdk: org.gnome.Sdk
command: exfalso
build-options:
  no-debuginfo: true
  strip: true
finish-args:
  - "--share=network"
  - "--socket=x11"
  - "--share=ipc"
  - "--socket=wayland"
  - "--filesystem=host"

  # some embedded covers and the fifo is still shared through /tmp
  - "--filesystem=/tmp"

  # bookmarks in the filesystem browser
  - "--filesystem=xdg-config/gtk-3.0:ro"

  # ...detecting the running desktop environment
  - "--talk-name=com.canonical.Unity.Launcher"
  - "--talk-name=org.enlightenment.wm.service"
  - "--talk-name=org.kde.plasmashell"

  # ...various other plugins
  - "--talk-name=org.freedesktop.FileManager1"
  - "--talk-name=org.gnome.SessionManager"
  - "--talk-name=org.xfce.FileManager"

  # ...talking to dconf
  - "--filesystem=xdg-run/dconf"
  - "--filesystem=~/.config/dconf:ro"
  - "--talk-name=ca.desrt.dconf"
  - "--env=DCONF_USER_CONFIG_DIR=.config/dconf"

modules:
  - python-modules.yaml
  - flathub-shared-modules/dbus-glib/dbus-glib-0.110.json
  - flathub-shared-modules/libappindicator/libappindicator-gtk3-introspection-12.10.json
  - name: kakasi
    sources:
      - type: archive
        url: http://kakasi.namazu.org/stable/kakasi-2.3.6.tar.xz
        sha256: 2ee57b1b03c74fd5766e741c3812028efc73bc0e0bf93a6e7ff20eb4701f3ee3
    cleanup:
      - /lib
      - /include
  - name: chromaprint
    buildsystem: cmake
    config-opts:
      - "-DCMAKE_BUILD_TYPE=Release"
      - "-DBUILD_TESTS=off"
      - "-DBUILD_TOOLS=off"
      - "-DAUDIO_PROCESSOR_LIB=dummy"
    sources:
      - type: archive
        url: https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-1.4.3.tar.gz
        sha256: ea18608b76fb88e0203b7d3e1833fb125ce9bb61efe22c6e169a50c52c457f82
  - name: gst-libav
    sources:
      - type: archive
        url: https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.16.1.tar.xz
        sha256: e8a5748ae9a4a7be9696512182ea9ffa6efe0be9b7976916548e9d4381ca61c4
  - name: gst-plugins-ugly
    buildsystem: meson
    sources:
      - type: archive
        url: https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.16.1.tar.xz
        sha256: 4bf913b2ca5195ac3b53b5e3ade2dc7c45d2258507552ddc850c5fa425968a1d
  - name: libgme
    buildsystem: cmake
    sources:
      - type: archive
        url: https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-0.6.2.tar.xz
        sha256: 5046cb471d422dbe948b5f5dd4e5552aaef52a0899c4b2688e5a68a556af7342
  - name: gst-plugins-bad
    buildsystem: meson
    sources:
      - type: archive
        url: https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.16.1.tar.xz
        sha256: 56481c95339b8985af13bac19b18bc8da7118c2a7d9440ed70e7dcd799c2adb5
  - name: quodlibet
    buildsystem: simple
    subdir: quodlibet
    build-commands:
      - pip3 install --no-deps --prefix=${FLATPAK_DEST} .
    sources:
      - type: git
        url: https://github.com/quodlibet/quodlibet.git
        tag: main
cleanup:
  - /include
  - /share/gtk-doc
  - /share/gir-1.0
  - "*.la"
  - "*.a"
cleanup-commands:
  - python3 -m compileall -f --invalidation-mode=unchecked-hash /app
