app-id: org.flameshot.Flameshot
runtime: org.kde.Platform
runtime-version: '6.9'
sdk: org.kde.Sdk
command: flameshot
finish-args:
  # X11 + XShm access
  - --share=ipc
  - --socket=fallback-x11
  # Wayland access
  - --socket=wayland
  - --device=dri
  # Connectivity
  - --share=network
  # QtSingleApplication, allow other instances to see log files
  - --env=TMPDIR=/var/tmp
  # Allow loading/saving files from anywhere
  - --filesystem=xdg-pictures
  # Notification access
  - --talk-name=org.freedesktop.Notifications
  # System Tray Icon
  - --talk-name=org.kde.StatusNotifierWatcher
modules:
  - name: flameshot
    buildsystem: cmake-ninja
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release 
      - -DUSE_WAYLAND_CLIPBOARD=1
    sources:
      - type: git
        url: https://gitlab.com/mattbas/Qt-Color-Widgets.git
        commit: 352bc8f99bf2174d5724ee70623427aa31ddc26a
        dest: external/Qt-Color-Widgets

      - type: git
        url: https://github.com/KDAB/KDSingleApplication.git
        tag: v1.2.0
        dest: external/KDSingleApplication

      - type: git
        url: https://github.com/flameshot-org/flameshot.git
        branch: master
        #tag: v13.0.0

    cleanup:
      - /share/bash-completion
      - /share/man
      - /share/zsh