id: ch.dissem.YAEP
runtime: org.freedesktop.Platform
runtime-version: '25.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
  - org.freedesktop.Sdk.Extension.openjdk21
command: yaep
finish-args:
  - --socket=x11
  - --device=dri # Required for better X11 performance
  - --share=ipc # Required for better X11 performance
  - --env=PATH=/app/bin:/app/jre/bin:/usr/bin
  - --env=JAVA_HOME=/app/jre
modules:
  - name: openjdk
    buildsystem: simple
    build-commands:
      - /usr/lib/sdk/openjdk21/install.sh
  - name: yaep
    buildsystem: simple
    sources:
      - type: dir
        path: ../desktop/build/compose/jars/
      - type: dir
        path: ../flatpak/info/
      - type: script
        dest-filename: yaep
        commands:
          - java -jar /app/data/yaep.jar
    build-commands:
      - install -Dm755 yaep                        /app/bin/yaep
      - install -Dm644 YAEP-*-release.jar          /app/data/yaep.jar
      - install -Dm644 ch.dissem.YAEP.desktop      /app/share/applications/ch.dissem.YAEP.desktop
      - install -Dm644 ch.dissem.YAEP.svg          /app/share/icons/hicolor/scalable/apps/ch.dissem.YAEP.svg
      - install -Dm644 ch.dissem.YAEP.metainfo.xml /app/share/metainfo/ch.dissem.YAEP.metainfo.xml
