{
 "app_id": "com.sigil_ebook.Sigil",
 "source_url": "https://raw.githubusercontent.com/flathub/com.sigil_ebook.Sigil/master/com.sigil_ebook.Sigil.yml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.10",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--device=dri",
  "--filesystem=home",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=org.freedesktop.Notifications"
 ],
 "module_count": 5,
 "fetched_at": "2026-09-17T16:08:44.491716+00:00",
 "manifest": {
  "app-id": "com.sigil_ebook.Sigil",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.10",
  "sdk": "org.kde.Sdk",
  "base": "io.qt.PySide.BaseApp",
  "base-version": "6.10",
  "rename-desktop-file": "sigil.desktop",
  "rename-icon": "sigil",
  "command": "sigil",
  "finish-args": [
   "--socket=fallback-x11",
   "--socket=wayland",
   "--share=ipc",
   "--share=network",
   "--device=dri",
   "--filesystem=home",
   "--talk-name=org.freedesktop.Notifications",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess",
   "--env=PATH=/app/jre/bin:/usr/bin:/app/bin"
  ],
  "cleanup": [
   "/lib/tk*/demos",
   "/share/man",
   "*.la",
   "*.a"
  ],
  "add-extensions": {
   "org.freedesktop.Sdk.Extension.openjdk17": {
    "version": "25.08",
    "directory": "jdk",
    "no-autodownload": true
   }
  },
  "cleanup-commands": [
   "${FLATPAK_DEST}/cleanup-BaseApp.sh",
   "ls -d -1 ${FLATPAK_DEST}/translations/qtwebengine_locales/* | grep -v en-US | xargs rm"
  ],
  "modules": [
   {
    "name": "jre",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p /app/jdk",
     "ln -s jdk/jvm/openjdk-17 /app/jre"
    ]
   },
   {
    "name": "sigil",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DUSE_SYSTEM_PYTHON=1",
     "-DUSE_SYSTEM_LIBS=0",
     "-DDISABLE_UPDATE_CHECK=1",
     "-DINSTALL_HICOLOR_ICONS=1"
    ],
    "post-install": [
     "install -Dm644 ${FLATPAK_ID}.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/Sigil-Ebook/Sigil.git",
      "tag": "2.7.6",
      "commit": "178ce73cb24524e07884c830e7effae420ab0c00",
      "disable-shallow-clone": true,
      "x-checker-data": {
       "type": "json",
       "is-main-source": true,
       "url": "https://api.github.com/repos/Sigil-Ebook/Sigil/releases/latest",
       "tag-query": ".tag_name",
       "timestamp-query": ".published_at"
      }
     },
     {
      "type": "shell",
      "commands": [
       "sed -i \"s/sigil.desktop/$FLATPAK_ID.desktop/g\" src/main.cpp"
      ]
     },
     {
      "type": "file",
      "path": "com.sigil_ebook.Sigil.metainfo.xml"
     }
    ],
    "modules": [
     "dependencies/sigil-pypi-dependencies.yaml",
     "dependencies/python3-tkinter.yaml"
    ]
   },
   {
    "name": "pip",
    "buildsystem": "simple",
    "build-commands": [
     "cp -av /usr/lib/python3*/site-packages/pip* /app/lib/python3*/site-packages/",
     "cp -a /usr/bin/pip /app/bin/"
    ]
   }
  ]
 }
}