{
 "app_id": "org.subsurface_divelog.Subsurface",
 "source_url": "https://raw.githubusercontent.com/flathub/org.subsurface_divelog.Subsurface/master/org.subsurface_divelog.Subsurface.yaml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.10",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--device=all",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--allow=bluetooth",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings",
  "--system-talk-name=org.bluez"
 ],
 "module_count": 8,
 "fetched_at": "2026-09-20T12:29:54.691250+00:00",
 "manifest": {
  "app-id": "org.subsurface_divelog.Subsurface",
  "sdk": "org.kde.Sdk",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.10",
  "command": "subsurface",
  "rename-appdata-file": "subsurface.metainfo.xml",
  "rename-desktop-file": "subsurface.desktop",
  "finish-args": [
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--share=network",
   "--allow=bluetooth",
   "--device=all",
   "--system-talk-name=org.bluez",
   "--filesystem=xdg-config/kdeglobals:ro",
   "--persist=~/.subsurface",
   "--talk-name=com.canonical.AppMenu.Registrar"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/share/doc",
   "/share/man",
   "/src",
   "*.a",
   "*.la"
  ],
  "modules": [
   {
    "name": "libssh2",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DCMAKE_C_FLAGS=-fPIC"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/libssh2/libssh2/archive/libssh2-1.11.1.tar.gz",
      "sha256": "82b35c61c78b475647bdc981a183c5b5ab0d979e1caee94186e8f9150f2b0d0d",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1730,
       "url-template": "https://github.com/libssh2/libssh2/archive/libssh2-$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "libzip",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/nih-at/libzip/archive/v1.11.4.tar.gz",
      "sha256": "4844595615e2436e3cf1ed46a1b260fbdaf8b8fa8f2b594e8b5d8162c696b8b2",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 10649,
       "url-template": "https://github.com/nih-at/libzip/archive/v$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "libgit2",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/libgit2/libgit2/archive/v1.9.2.tar.gz",
      "sha256": "6f097c82fc06ece4f40539fb17e9d41baf1a5a2fc26b1b8562d21b89bc355fe6",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1627,
       "url-template": "https://github.com/libgit2/libgit2/archive/v$version.tar.gz"
      }
     }
    ]
   },
   "python3-docutils.json",
   {
    "name": "googlemaps",
    "buildsystem": "qmake",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/subsurface/googlemaps",
      "commit": "fdad408ce0d99b48af80ee9510bc46b5676ca782"
     },
     {
      "type": "shell",
      "commands": [
       "sed -i \"s|\\$\\$\\[QT_INSTALL_PLUGINS\\]|/app/lib/plugins|\" googlemaps.pro"
      ]
     }
    ]
   },
   {
    "name": "libconfuse",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/libconfuse/libconfuse/archive/v3.3.tar.gz",
      "sha256": "cb90c06f2dbec971792af576d5b9a382fb3c4ca2b1deea55ea262b403f4e641e",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1581,
       "url-template": "https://github.com/libconfuse/libconfuse/archive/v$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "libftdi",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DLIB_SUFFIX=",
     "-Wno-dev",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.5.tar.bz2",
      "sha256": "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 14622,
       "url-template": "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-$version.tar.bz2"
      }
     }
    ]
   },
   {
    "name": "subsurface",
    "buildsystem": "cmake",
    "builddir": true,
    "config-opts": [
     "-DBUILD_WITH_QT6=ON",
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DFTDISUPPORT=ON",
     "-DNO_USERMANUAL=ON",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
     "-DBUILD_TESTS=ON",
     "-DFLATHUB_BUILD=ON"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/subsurface/subsurface",
      "commit": "bb47bfa2834dea073e5a709051dbda8405e3de16",
      "disable-shallow-clone": true
     },
     {
      "type": "git",
      "url": "https://github.com/subsurface/nightly-builds",
      "commit": "7b0b3e8324b57ac76bbbde6e6f227415593036b1",
      "disable-shallow-clone": true,
      "dest": "nightly-builds"
     },
     {
      "type": "shell",
      "commands": [
       "cd libdivecomputer && autoreconf --install && ./configure --prefix=/app && make && mkdir -p /app/include && make install"
      ]
     },
     {
      "type": "shell",
      "commands": [
       "sed -e \"s|setDesktopFileName(\\\"subsurface\\\")|setDesktopFileName(\\\"org.subsurface_divelog.Subsurface\\\")|\" -i core/qt-init.cpp",
       "rm -f nightly-builds/.git/hooks/post-checkout",
       "scripts/get-version.sh --no-fetch 1 > latest-subsurface-buildnumber.tmp && mv latest-subsurface-buildnumber.tmp latest-subsurface-buildnumber",
       "echo \"CICD-release\" > latest-subsurface-buildnumber-extension",
       "rm -rf nightly-builds",
       "sed -e \"s|subsurface-icon|org.subsurface_divelog.Subsurface|\" -i subsurface.desktop"
      ]
     }
    ],
    "build-commands": [
     "QT_QPA_PLATFORM=offscreen ctest --output-on-failure -E '^TestParsePerformance$'"
    ]
   }
  ]
 }
}