app-id: io.github.nelsonduarte.PDFApps
runtime: org.kde.Platform
runtime-version: 6.8
sdk: org.kde.Sdk
command: pdfapps

finish-args:
  - --share=ipc
  - --socket=fallback-x11
  - --socket=wayland
  - --device=dri
  - --filesystem=home
  - --filesystem=xdg-documents
  - --filesystem=xdg-download

cleanup:
  - /include
  - /lib/pkgconfig
  - /share/man
  - '*.la'
  - '*.a'

modules:
  # Python dependencies (generated by req2flatpak)
  - python-modules.yml

  - name: pdfapps
    buildsystem: simple
    build-commands:
      - mkdir -p ${FLATPAK_DEST}/share/pdfapps
      - cp -r app pdfapps.py icon.ico icon_512.png pdfapps.svg ${FLATPAK_DEST}/share/pdfapps/
      - install -Dm755 flatpak/pdfapps.sh ${FLATPAK_DEST}/bin/pdfapps
      - install -Dm644 flatpak/io.github.nelsonduarte.PDFApps.desktop
        ${FLATPAK_DEST}/share/applications/io.github.nelsonduarte.PDFApps.desktop
      - install -Dm644 flatpak/io.github.nelsonduarte.PDFApps.metainfo.xml
        ${FLATPAK_DEST}/share/metainfo/io.github.nelsonduarte.PDFApps.metainfo.xml
      - install -Dm644 icon_512.png
        ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/io.github.nelsonduarte.PDFApps.png
      - install -Dm644 pdfapps.svg
        ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/io.github.nelsonduarte.PDFApps.svg
      - install -Dm644 LICENSE ${FLATPAK_DEST}/share/licenses/${FLATPAK_ID}/LICENSE
    sources:
      - type: git
        url: https://github.com/nelsonduarte/PDFApps.git
        tag: v1.13.8
