app-id: net.zdechov.app.TransLines
runtime: org.kde.Platform
runtime-version: '5.15-23.08'
sdk: org.kde.Sdk
sdk-extensions:
  - org.freedesktop.Sdk.Extension.freepascal
command: TransLines
finish-args:
  - --share=ipc
  - --socket=fallback-x11
  - --socket=wayland
  - --socket=pulseaudio
  - --device=dri
modules:
  - name: qt5pas
    buildsystem: qmake
    config-opts:
      - -after
      - target.path=/app/lib
    sources:
      - type: shell
        commands:
          - cp -r /usr/lib/sdk/freepascal/share/lazarus/lcl/interfaces/qt5/cbindings/. .
  - name: TransLines
    sources:
      - type: svn
        url: https://svn.zdechov.net/translines/trunk
        revision: r149
    buildsystem: simple
    build-commands:
      - |
        . /usr/lib/sdk/freepascal/enable.sh
        lazbuild --build-mode=Release --ws=qt5 TransLines.lpi
      - install -Dm755 TransLines -t $FLATPAK_DEST/share/TransLines
      - install -d $FLATPAK_DEST/bin
      - ln -s $FLATPAK_DEST/share/TransLines/TransLines $FLATPAK_DEST/bin/TransLines
      - install -Dm644 Install/flatpak/${FLATPAK_ID}.desktop -t $FLATPAK_DEST/share/applications
      - install -Dm644 Images/256x256/TransLines.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png
      - install -Dm644 Languages/*.po -t $FLATPAK_DEST/share/TransLines/Languages
      - install -Dm644 Install/flatpak/${FLATPAK_ID}.appdata.xml $FLATPAK_DEST/share/metainfo/${FLATPAK_ID}.metainfo.xml
