app-id: net.zdechov.app.AcronymDecoder
runtime: org.kde.Platform
runtime-version: '5.15-24.08'
sdk: org.kde.Sdk
sdk-extensions:
  - org.freedesktop.Sdk.Extension.freepascal
command: AcronymDecoder
rename-icon: AcronymDecoder
rename-desktop-file: AcronymDecoder.desktop
finish-args:
  - --share=ipc
  - --socket=fallback-x11
  - --socket=wayland
  - --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: AcronymDecoder
    sources:
      - type: svn
        url: https://svn.zdechov.net/AcronymDecoder/trunk
        revision: r234
    buildsystem: simple
    build-commands:
      - |
        . /usr/lib/sdk/freepascal/enable.sh
        lazbuild --build-mode=Release --ws=qt5 AcronymDecoder.lpi
      - install -Dm755 AcronymDecoder -t $FLATPAK_DEST/bin
      - install -Dm644 Languages/*.po -t $FLATPAK_DEST/share/AcronymDecoder/Languages
      - install -Dm644 Packages/Common/Languages/*.po -t $FLATPAK_DEST/share/AcronymDecoder/Languages
      - install -Dm644 Install/shared/acronym-decoder.xml $FLATPAK_DEST/share/mime/packages/$FLAPTAK_ID.xml
      - install -Dm644 Install/shared/AcronymDecoder.desktop -t $FLATPAK_DEST/share/applications
      - install -Dm644 Images/256x256/AcronymDecoder.png -t $FLATPAK_DEST/share/icons/hicolor/256x256/apps
      - install -Dm644 Images/256x256/AcronymDecoder.png $FLATPAK_DEST/share/pixmaps/application-adp.png
      - install -Dm644 Examples/*.adp -t $FLATPAK_DEST/share/AcronymDecoder/Examples
      - install -Dm644 Install/flatpak/${FLATPAK_ID}.metainfo.xml -t $FLATPAK_DEST/share/metainfo
