{
 "app_id": "ee.ria.qdigidoc4",
 "source_url": "https://raw.githubusercontent.com/flathub/ee.ria.qdigidoc4/master/ee.ria.qdigidoc4.yml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.11",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=pcsc",
  "--socket=wayland",
  "--device=all",
  "--filesystem=home",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings"
 ],
 "module_count": 7,
 "fetched_at": "2026-09-20T06:37:29.825541+00:00",
 "manifest": {
  "app-id": "ee.ria.qdigidoc4",
  "command": "run.sh",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.11",
  "sdk": "org.kde.Sdk",
  "rename-icon": "qdigidoc4",
  "rename-mime-file": "qdigidoc4.xml",
  "rename-mime-icons": [
   "application-x-cdoc",
   "application-vnd.etsi.asic-e+zip"
  ],
  "finish-args": [
   "--persist=.digidocpp",
   "--share=network",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--socket=pcsc",
   "--device=all",
   "--filesystem=home"
  ],
  "cleanup": [
   "/include",
   "/lib/cmake",
   "/lib/pkgconfig",
   "/etc/bash_completion.d",
   "/share/doc",
   "/share/man"
  ],
  "modules": [
   {
    "name": "flatbuffers",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/google/flatbuffers/archive/refs/tags/v25.12.19-2026-02-06-03fffb2.tar.gz",
      "sha256": "ccbce58684691de1e7d51f5e87786266b37d06ab66e9dfe2d0ec106fe50aace0",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/google/flatbuffers/releases/latest",
       "version-query": ".tag_name",
       "url-query": "\"https://github.com/google/flatbuffers/archive/refs/tags/\" + .tag_name + \".tar.gz\""
      }
     }
    ]
   },
   {
    "name": "xmlsec",
    "buildsystem": "autotools",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/lsh123/xmlsec/archive/refs/tags/1.3.12.tar.gz",
      "sha256": "d6e6a758198fe91bcaab584443350df38b68230c93dbfd62843707d217ee114c",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/lsh123/xmlsec/releases/latest",
       "version-query": ".tag_name",
       "url-query": "\"https://github.com/lsh123/xmlsec/archive/refs/tags/\" + .tag_name + \".tar.gz\""
      }
     },
     {
      "type": "patch",
      "paths": [
       "xmlsec/xmlsec1-1.3.12.legacy.patch"
      ]
     }
    ]
   },
   {
    "name": "libdigidocpp",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/open-eid/libdigidocpp/archive/refs/tags/v4.5.1.tar.gz",
      "sha256": "536ae93e95a19314645703e02c3391cfe52c590526b70daceffa4185eac5a98c",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/open-eid/libdigidocpp/releases/latest",
       "version-query": ".tag_name",
       "url-query": "\"https://github.com/open-eid/libdigidocpp/archive/refs/tags/\" + .tag_name + \".tar.gz\""
      }
     }
    ]
   },
   {
    "name": "openldap",
    "buildsystem": "autotools",
    "config-opts": [
     "--disable-backends",
     "--disable-overlays",
     "--disable-slapd",
     "--disable-debug",
     "--enable-dynamic",
     "--without-threads",
     "--with-tls=gnutls"
    ],
    "cleanup": [
     "/bin",
     "/share/man"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.7.1.tgz",
      "sha256": "253db80f301258ea69cda1184766d57395b836aaabf41157eb0316eb0fac1341",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 2551,
       "url-template": "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-$version.tgz"
      }
     },
     {
      "type": "script",
      "dest-filename": "autogen.sh",
      "commands": [
       "AUTOMAKE=/bin/true autoreconf -vfi"
      ]
     }
    ]
   },
   {
    "name": "pcsc-lite",
    "buildsystem": "meson",
    "config-opts": [
     "-Dlibudev=false",
     "-Dlibsystemd=false",
     "-Dserial=false",
     "-Dusb=false",
     "-Dpolkit=false"
    ],
    "cleanup": [
     "/sbin"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/LudovicRousseau/PCSC/archive/refs/tags/2.5.1.tar.gz",
      "sha256": "78cd514e1b549292696a5c549d42d69a44fd084aa06ccd1af2ff6c2208282581",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/LudovicRousseau/PCSC/releases/latest",
       "version-query": ".tag_name",
       "url-query": "\"https://github.com/LudovicRousseau/PCSC/archive/refs/tags/\" + .tag_name + \".tar.gz\""
      }
     }
    ]
   },
   {
    "name": "opensc",
    "config-opts": [
     "--enable-p11_system_config_modules=/etc/pkcs11/modules"
    ],
    "cleanup": [
     "/share/applications/org.opensc.notify.desktop"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/OpenSC/OpenSC/archive/refs/tags/0.27.1.tar.gz",
      "sha256": "9b72f1b5d92569de67a42bf0edb21ecdc685ad03378343416362a99b90b1fad1",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/OpenSC/OpenSC/releases/latest",
       "version-query": ".tag_name",
       "url-query": "\"https://github.com/OpenSC/OpenSC/archive/refs/tags/\" + .tag_name + \".tar.gz\""
      }
     },
     {
      "type": "patch",
      "paths": [
       "opensc/0001-Use-sysconfdir-opensc-for-opensc.conf.patch",
       "opensc/0002-Drop-non-functional-ENABLE_AUTOSTART.patch"
      ]
     }
    ]
   },
   {
    "name": "qdigidoc4",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/open-eid/DigiDoc4-Client/releases/download/v4.11.1/qdigidoc4-4.11.1.tar.gz",
      "sha256": "16d7c37ef14cd15bab8d1bda3e7eb5e78ff29130f983490678aa6cc42d828977",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/open-eid/DigiDoc4-Client/releases/latest",
       "version-query": ".tag_name | sub(\"^v\"; \"\")",
       "url-query": ".assets[] | select(.name == \"qdigidoc4-\" + $version + \".tar.gz\") | .browser_download_url"
      }
     },
     {
      "type": "patch",
      "path": "qdigidoc4/QPKCS11.patch"
     },
     {
      "type": "file",
      "path": "ee.ria.qdigidoc4.metainfo.xml"
     },
     {
      "type": "file",
      "url": "https://ec.europa.eu/tools/lotl/eu-lotl.xml",
      "sha256": "24c47f10c2dee1821e811664978511f0ef2129c46644ff0c61b47311dd639616",
      "dest": "client",
      "dest-filename": "eu-lotl.xml",
      "x-checker-data": {
       "type": "rotating-url",
       "url": "https://ec.europa.eu/tools/lotl/eu-lotl.xml"
      }
     },
     {
      "type": "file",
      "url": "https://sr.riik.ee/tsl/estonian-tsl.xml",
      "sha256": "c6b7b872fadcafdd24ad772f7b6649c5c87e3aa27ea44952727ea73d2c435918",
      "dest": "client",
      "dest-filename": "EE.xml",
      "x-checker-data": {
       "type": "rotating-url",
       "url": "https://sr.riik.ee/tsl/estonian-tsl.xml"
      }
     },
     {
      "type": "file",
      "url": "https://id.eesti.ee/config.json",
      "sha256": "2d6c7befb868719ced1415891cdb85a9e670083f69dc5e7a5756278b7d4bb032",
      "dest": "common",
      "dest-filename": "config.json",
      "x-checker-data": {
       "type": "rotating-url",
       "url": "https://id.eesti.ee/config.json"
      }
     },
     {
      "type": "file",
      "url": "https://id.eesti.ee/config.ecc",
      "sha256": "5cd66e935ecd628dc89ba0b175d5029c98fc94233b5edbc15388304838ebb8fe",
      "dest": "common",
      "dest-filename": "config.ecc",
      "x-checker-data": {
       "type": "rotating-url",
       "url": "https://id.eesti.ee/config.ecc"
      }
     },
     {
      "type": "file",
      "url": "https://id.eesti.ee/config.ecpub",
      "sha256": "26049d2d34acad69b33fb0dd6eba91a23df6f2b3c1228f5efc16e29a276a8c34",
      "dest": "common",
      "dest-filename": "config.ecpub",
      "x-checker-data": {
       "type": "rotating-url",
       "url": "https://id.eesti.ee/config.ecpub"
      }
     },
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "env TMPDIR=\"$XDG_RUNTIME_DIR/app/$FLATPAK_ID\" qdigidoc4 \"$@\""
      ]
     }
    ],
    "post-install": [
     "install run.sh \"${FLATPAK_DEST}/bin/run.sh\"",
     "install -Dm644 ee.ria.qdigidoc4.metainfo.xml $FLATPAK_DEST/share/metainfo/ee.ria.qdigidoc4.metainfo.xml",
     "ln -s $FLATPAK_DEST/share/locale/et/LC_MESSAGES/nautilus-qdigidoc.mo $FLATPAK_DEST/share/locale/et/nautilus-qdigidoc.mo",
     "desktop-file-edit --set-key=Exec --set-value=\"run.sh\" /app/share/applications/ee.ria.qdigidoc4.desktop"
    ]
   }
  ]
 }
}