app-id: org.jacktrip.JackTrip.Devel
runtime: org.kde.Platform
runtime-version: '5.15-21.08'
sdk: org.kde.Sdk
command: jacktrip
finish-args:
  # X11 + XShm access
  - --share=ipc
  - --socket=x11
  # Wayland access
  # - --socket=wayland
  # OpenGL
  - --device=dri
  # Needs network access
  - --share=network
  # Pipewire/Jack
  - --filesystem=xdg-run/pipewire-0
cleanup:
  - /lib/python3.8
  - /share/man
modules:
  - shared-modules/linux-audio/jack2.json
  - name: python3-pyyaml
    buildsystem: simple
    cleanup: [ "*" ]
    build-commands:
    - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "pyyaml" --no-build-isolation
    sources:
    - type: file
      url: https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz
      sha256: 68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2
  - name: python3-jinja2
    buildsystem: simple
    cleanup: [ "*" ]
    build-commands:
    - pip3 install --verbose --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/1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/MarkupSafe-2.1.1.tar.gz
      sha256: 7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b
    - type: file
      url: https://files.pythonhosted.org/packages/bc/c3/f068337a370801f372f2f8f6bad74a5c140f6fda3d9de154052708dd3c65/Jinja2-3.1.2-py3-none-any.whl
      sha256: 6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61
  - name: jacktrip
    buildsystem: meson
    config-opts:
      - -Dprofile=development
    sources:
      - type: git
        url: {{ env['REPO'] }}
        branch: {{ env['REF'] }}
