id: io.github.rizukirr.apic
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
  - org.freedesktop.Sdk.Extension.rust-stable
command: apic-gui
finish-args:
  - --socket=wayland
  - --socket=fallback-x11
  - --device=dri
  - --share=ipc
build-options:
  append-path: /usr/lib/sdk/rust-stable/bin
  env:
    CARGO_HOME: /run/build/apic/cargo
modules:
  - name: apic
    buildsystem: simple
    build-options:
      env:
        CARGO_NET_OFFLINE: 'true'
    build-commands:
      - cargo --offline build --release -p apic-gui
      - install -Dm755 target/release/apic-gui /app/bin/apic-gui
      - install -Dm644 packaging/flatpak/io.github.rizukirr.apic.desktop /app/share/applications/io.github.rizukirr.apic.desktop
      - install -Dm644 apic-gui/assets/icon.png /app/share/icons/hicolor/256x256/apps/io.github.rizukirr.apic.png
      - install -Dm644 packaging/flatpak/io.github.rizukirr.apic.metainfo.xml /app/share/metainfo/io.github.rizukirr.apic.metainfo.xml
    sources:
      - type: git
        url: https://github.com/rizukirr/apic.git
        tag: v0.3.5
      - cargo-sources.json
