app-id: io.github.HakanSeven12.H7CAD
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
  - org.freedesktop.Sdk.Extension.rust-stable
command: H7CAD

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

build-options:
  append-path: /usr/lib/sdk/rust-stable/bin
  env:
    CARGO_HOME: /run/build/H7CAD/cargo

modules:
  - name: H7CAD
    buildsystem: simple
    build-commands:
      - cargo --offline fetch --manifest-path Cargo.toml --verbose
      - cargo --offline build --release --verbose
      - install -Dm755 target/release/H7CAD /app/bin/H7CAD
      - install -Dm644 assets/logo.svg /app/share/icons/hicolor/scalable/apps/io.github.HakanSeven12.H7CAD.svg
      - install -Dm644 flatpak/io.github.HakanSeven12.H7CAD.desktop /app/share/applications/io.github.HakanSeven12.H7CAD.desktop
      - install -Dm644 flatpak/io.github.HakanSeven12.H7CAD.metainfo.xml /app/share/metainfo/io.github.HakanSeven12.H7CAD.metainfo.xml
    sources:
      - type: git
        url: https://github.com/HakanSeven12/H7CAD.git
        tag: v0.1.0
        commit: ff84a5e197ecf264f5e4e159173b157f97bcb7ce
      - cargo-sources.json
