id: com.roundabout_host.Izvor
runtime: org.freedesktop.Platform
runtime-version: "24.08"
sdk: org.freedesktop.Sdk
command: izvor
finish-args:
  - --share=network
  - --filesystem=host
  - --socket=fallback-x11
  - --share=ipc
  - --socket=wayland
  - --talk-name=org.freedesktop.Flatpak
modules:
  # flatpak-pip-generator
  - pypi-dependencies.json
  - name: izvor
    buildsystem: simple
    build-commands:
      - |
        PYTHON_NAME=python$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))') 
        mkdir -p /app/lib/$PYTHON_NAME/site-packages/izvor_utils
        cp -r ./izvor_utils /app/lib/$PYTHON_NAME/site-packages/
      - mkdir -p /app/bin /app/share/izvor
      - cp -r ./src/* /app/share/izvor/
      - chmod +x /app/share/izvor/__init__.py
      - ln -s /app/share/izvor/__init__.py /app/bin/izvor
      - mkdir -p /app/share/icons/hicolor/scalable/apps
      - cp com.roundabout_host.Izvor.svg /app/share/icons/hicolor/scalable/apps/
      - mkdir -p /app/share/applications
      - cp com.roundabout_host.Izvor.desktop /app/share/applications/
    sources:
      - type: git
        url: https://roundabout-host.com/git/roundabout/izvor
        branch: master
        commit: fdbc2e0630481b66041efd9f58bd2bae102a5020