{
 "app_id": "com.calibre_ebook.calibre",
 "source_url": "https://raw.githubusercontent.com/flathub/com.calibre_ebook.calibre/master/com.calibre_ebook.calibre.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=all",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--filesystem=xdg-run/speech-dispatcher:ro",
  "--filesystem=host",
  "--filesystem=xdg-data/Trash",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--system-talk-name=org.freedesktop.UDisks2"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-20T11:38:44.685627+00:00",
 "manifest": {
  "app-id": "com.calibre_ebook.calibre",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "calibre",
  "separate-locales": false,
  "rename-desktop-file": "calibre-gui.desktop",
  "rename-appdata-file": "calibre-gui.metainfo.xml",
  "rename-mime-file": "calibre-mimetypes.xml",
  "rename-icon": "calibre-gui",
  "finish-args": [
   "--device=all",
   "--filesystem=host",
   "--filesystem=xdg-config/kdeglobals:ro",
   "--share=ipc",
   "--share=network",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--socket=wayland",
   "--filesystem=xdg-run/speech-dispatcher:ro",
   "--filesystem=xdg-data/Trash",
   "--system-talk-name=org.freedesktop.UDisks2",
   "--talk-name=com.canonical.AppMenu.Registrar",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--env=KDE_FORK_SLAVES=1",
   "--env=SSL_CERT_DIR=/etc/ssl/certs",
   "--env=OPENSSL_CONF=/dev/null"
  ],
  "modules": [
   {
    "name": "calibre",
    "buildsystem": "simple",
    "build-options": {
     "env": [
      "XDG_UTILS_INSTALL_MODE=system"
     ]
    },
    "build-commands": [
     "mkdir -p \"${FLATPAK_DEST}/lib/calibre\"",
     "tar -xvf calibre*.txz -C \"${FLATPAK_DEST}/lib/calibre\"",
     "rm -f calibre*.txz",
     "rm \"${FLATPAK_DEST}/lib/calibre/resources/fonts/liberation\"/*.ttf",
     "ln -s /usr/share/fonts/liberation-fonts/*.ttf \"${FLATPAK_DEST}/lib/calibre/resources/fonts/liberation/\"",
     "mkdir -p \"${FLATPAK_DEST}/bin\" \"${FLATPAK_DEST}\"/share/{applications,desktop-directories,icons/hicolor,mime/packages}",
     "$FLATPAK_DEST/lib/calibre/calibre_postinstall --root=$FLATPAK_DEST",
     "mv $FLATPAK_DEST/share/applications/{calibre-ebook-edit,$FLATPAK_ID.ebook-edit}.desktop",
     "for p in 16 32 48 64 128 256; do mv $FLATPAK_DEST/share/icons/hicolor/${p}x${p}/apps/{calibre-ebook-edit,$FLATPAK_ID.ebook-edit}.png; done",
     "desktop-file-edit --set-icon=$FLATPAK_ID.ebook-edit $FLATPAK_DEST/share/applications/$FLATPAK_ID.ebook-edit.desktop",
     "mv $FLATPAK_DEST/share/applications/{calibre-ebook-viewer,$FLATPAK_ID.ebook-viewer}.desktop",
     "for p in 16 32 48 64 128 256; do mv $FLATPAK_DEST/share/icons/hicolor/${p}x${p}/apps/{calibre-viewer,$FLATPAK_ID.ebook-viewer}.png; done",
     "desktop-file-edit --set-icon=$FLATPAK_ID.ebook-viewer $FLATPAK_DEST/share/applications/$FLATPAK_ID.ebook-viewer.desktop",
     "mv $FLATPAK_DEST/share/applications/{calibre-lrfviewer,$FLATPAK_ID.lrfviewer}.desktop",
     "desktop-file-edit --set-icon=$FLATPAK_ID.ebook-viewer $FLATPAK_DEST/share/applications/$FLATPAK_ID.lrfviewer.desktop"
    ],
    "cleanup": [
     "/bin/calibre-uninstall",
     "/share/applications/mimeinfo.cache"
    ],
    "sources": [
     {
      "type": "file",
      "only-arches": [
       "x86_64"
      ],
      "url": "https://github.com/kovidgoyal/calibre/releases/download/v9.14.0/calibre-9.14.0-x86_64.txz",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 6141,
       "url-template": "https://github.com/kovidgoyal/calibre/releases/download/v$version/calibre-$version-x86_64.txz"
      },
      "sha256": "7f53a0863ed6d32407bc72053b966e39d5b64813f2592bd9c741504c01c0e7f3"
     },
     {
      "type": "file",
      "only-arches": [
       "aarch64"
      ],
      "url": "https://github.com/kovidgoyal/calibre/releases/download/v9.14.0/calibre-9.14.0-arm64.txz",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 6141,
       "url-template": "https://github.com/kovidgoyal/calibre/releases/download/v$version/calibre-$version-arm64.txz"
      },
      "sha256": "453d3032464aa11d5b9374f0c798f97610e5a02a824e7c6c58bf4662bfe3ce02"
     }
    ],
    "modules": [
     {
      "name": "xdg-utils",
      "buildsystem": "autotools",
      "cleanup": [
       "*"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://portland.freedesktop.org/download/xdg-utils-1.1.3.tar.gz",
        "sha256": "d798b08af8a8e2063ddde6c9fa3398ca81484f27dec642c5627ffcaa0d4051d9"
       }
      ],
      "modules": [
       {
        "name": "links",
        "buildsystem": "autotools",
        "post-install": [
         "ln -s links \"${FLATPAK_DEST}/bin/elinks\""
        ],
        "cleanup": [
         "*"
        ],
        "sources": [
         {
          "type": "archive",
          "url": "http://links.twibright.com/download/links-2.30.tar.bz2",
          "sha256": "c4631c6b5a11527cdc3cb7872fc23b7f2b25c2b021d596be410dadb40315f166",
          "x-checker-data": {
           "type": "anitya",
           "project-id": 1822,
           "url-template": "http://links.twibright.com/download/links-$version.tar.bz2"
          }
         }
        ]
       },
       {
        "name": "xmlto",
        "buildsystem": "autotools",
        "cleanup": [
         "*"
        ],
        "sources": [
         {
          "type": "archive",
          "url": "https://releases.pagure.org/xmlto/xmlto-0.0.29.tar.bz2",
          "sha256": "6000d8e8f0f9040426c4f85d7ad86789bc88d4aeaef585c4d4110adb0b214f21",
          "x-checker-data": {
           "type": "anitya",
           "project-id": 13307,
           "url-template": "https://releases.pagure.org/xmlto/xmlto-$version.tar.bz2"
          }
         },
         {
          "type": "script",
          "commands": [
           "autoreconf -fiv"
          ],
          "dest-filename": "autogen.sh"
         }
        ]
       }
      ]
     }
    ]
   }
  ]
 }
}