app-id: com.kangaroopunch.JoeyDev

runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk

command: joeydev

modules:
  - name: joeydev

    buildsystem: simple
    build-commands:
      - cmake -DDEBUG_MODE=OFF -G Ninja -S . -B .
      - ninja
      - install -D joeydev /app/bin/joeydev
      - install -Dm755 com.kangaroopunch.JoeyDev.desktop -t /app/share/applications
      - install -Dm644 com.kangaroopunch.JoeyDev.png /app/share/icons/hicolor/128x128/apps/com.kangaroopunch.JoeyDev.png
      - install -Dm644 com.kangaroopunch.JoeyDev.appdata.xml -t /app/share/metainfo

    sources:
      - type: dir
        path: include
        dest: include

      - type: dir
        path: src
        dest: src

      - type: dir
        path: ui
        dest: ui

      - type: dir
        path: tools
        dest: tools

      - type: dir
        path: thirdparty/
        dest: thirdparty/

      - type: file
        path: CMakeLists.txt

      - type: file
        path: com.kangaroopunch.JoeyDev.desktop

      - type: file
        path: com.kangaroopunch.JoeyDev.png

      - type: file
        path: com.kangaroopunch.JoeyDev.appdata.xml

finish-args:
  - --share=ipc
  - --socket=fallback-x11
  - --socket=wayland
  - --filesystem=host
  - --share=network
  - --device=dri
