{
 "app_id": "eu.vcmi.VCMI",
 "source_url": "https://raw.githubusercontent.com/flathub/eu.vcmi.VCMI/master/eu.vcmi.VCMI.yaml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.10",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=all",
  "--filesystem=xdg-run/app/com.discordapp.Discord:create",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--filesystem=xdg-run/discord-ipc-0",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings"
 ],
 "module_count": 14,
 "fetched_at": "2026-09-17T16:09:54.311477+00:00",
 "manifest": {
  "app-id": "eu.vcmi.VCMI",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.10",
  "sdk": "org.kde.Sdk",
  "rename-desktop-file": "vcmilauncher.desktop",
  "rename-icon": "vcmiclient",
  "command": "vcmilauncher",
  "finish-args": [
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--socket=pulseaudio",
   "--share=network",
   "--device=all",
   "--filesystem=xdg-run/app/com.discordapp.Discord:create",
   "--filesystem=xdg-run/discord-ipc-0"
  ],
  "cleanup": [
   "/include",
   "/lib/cmake",
   "/lib/pkgconfig",
   "*.a",
   "*.la",
   "/share/Catch2",
   "/share/doc",
   "/share/fuzzylite",
   "/share/man",
   "/share/bash-completion"
  ],
  "modules": [
   {
    "name": "boost",
    "buildsystem": "simple",
    "build-commands": [
     "./bootstrap.sh --prefix=/app --with-libraries=program_options,filesystem,thread,locale,date_time,atomic,iostreams",
     "./b2",
     "./b2 install"
    ],
    "sources": [
     {
      "sha256": "c46baee75ed4b558cf6553630d0615a147ed582812917b57e6f0839d1954549f",
      "type": "archive",
      "url": "https://archives.boost.io/release/1.92.0/source/boost_1_92_0.zip",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 6845,
       "stable-only": true,
       "url-template": "https://archives.boost.io/release/$version/source/boost_${major}_${minor}_$patch.zip"
      }
     }
    ]
   },
   {
    "name": "minizip",
    "subdir": "contrib/minizip",
    "sources": [
     {
      "sha256": "38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32",
      "type": "archive",
      "url": "https://zlib.net/zlib-1.3.1.tar.xz"
     },
     {
      "type": "shell",
      "commands": [
       "rm contrib/minizip/Makefile",
       "cd contrib/minizip && autoreconf --install"
      ]
     }
    ]
   },
   {
    "name": "onetbb",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-Wno-dev",
     "-DTBB_TEST=OFF"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2023.1.0.tar.gz",
      "sha256": "191288b52e1e6b17198000b64d77d194bb65e791be46ebc606e9b091781e2070",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 227581,
       "stable-only": true,
       "url-template": "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v$version.tar.gz"
      }
     }
    ]
   },
   "shared-modules/SDL2/SDL2_image.json",
   "shared-modules/SDL2/SDL2_ttf.json",
   "shared-modules/luajit/luajit.json",
   {
    "name": "catch2",
    "config-opts": [
     "-Wno-dev"
    ],
    "builddir": true,
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/catchorg/Catch2/archive/refs/tags/v2.13.10.tar.gz",
      "sha256": "d54a712b7b1d7708bc7a819a8e6e47b2fde9536f487b89ccbca295072a7d9943"
     }
    ]
   },
   {
    "name": "fuzzylite",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/fuzzylite/fuzzylite",
      "commit": "03d99e42ed37867deabda61bbedde34e9f4b48f0"
     }
    ]
   },
   {
    "name": "unshield",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/twogood/unshield/archive/refs/tags/1.6.2.tar.gz",
      "sha256": "a937ef596ad94d16e7ed2c8553ad7be305798dcdcfd65ae60210b1e54ab51a2f",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 16008,
       "stable-only": true,
       "url-template": "https://github.com/twogood/unshield/archive/refs/tags/$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "pandoc",
    "buildsystem": "simple",
    "build-commands": [
     "install -D bin/pandoc /app/bin/pandoc"
    ],
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "archive",
      "only-arches": [
       "x86_64"
      ],
      "url": "https://github.com/jgm/pandoc/releases/download/3.11/pandoc-3.11-linux-amd64.tar.gz",
      "sha256": "37edb3bbcf722f921a009941bf5874e2e0c09263226c9b4a2d980788cb062ab6",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 2589,
       "stable-only": true,
       "url-template": "https://github.com/jgm/pandoc/releases/download/$version/pandoc-$version-linux-amd64.tar.gz"
      }
     },
     {
      "type": "archive",
      "only-arches": [
       "aarch64"
      ],
      "url": "https://github.com/jgm/pandoc/releases/download/3.11/pandoc-3.11-linux-arm64.tar.gz",
      "sha256": "56ed5566ec41d22ec9ee0704e6ac0b98ba102e92384efd5306173a22d314c79a",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 2589,
       "stable-only": true,
       "url-template": "https://github.com/jgm/pandoc/releases/download/$version/pandoc-$version-linux-arm64.tar.gz"
      }
     }
    ]
   },
   {
    "name": "libsquish",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
     "-DBUILD_SQUISH_WITH_OPENMP=ON",
     "-DBUILD_SHARED_LIBS=ON"
    ],
    "build-options": {
     "arch": {
      "x86_64": {
       "config-opts": [
        "-DBUILD_SQUISH_WITH_SSE2=ON"
       ]
      },
      "aarch64": {
       "config-opts": [
        "-DBUILD_SQUISH_WITH_SSE2=OFF"
       ]
      }
     }
    },
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/project/libsquish/libsquish-1.15.tgz",
      "sha256": "628796eeba608866183a61d080d46967c9dda6723bc0a3ec52324c85d2147269",
      "strip-components": 0,
      "x-checker-data": {
       "type": "anitya",
       "project-id": 21493,
       "stable-only": true,
       "url-template": "https://downloads.sourceforge.net/project/libsquish/libsquish-$version.tgz"
      }
     }
    ]
   },
   {
    "name": "libonnxruntime",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p /app/include/onnxruntime",
     "cp -r --no-target-directory ./include /app/include/onnxruntime",
     "cp -r --no-target-directory ./lib /app/lib64",
     "cp -r --no-target-directory ./include /app/include",
     "cp -r --no-target-directory ./lib /app/lib"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/microsoft/onnxruntime/releases/download/v1.30.0/onnxruntime-linux-x64-1.30.0.tgz",
      "sha256": "a5ed5a3cac51fbb2e90da632ae43d19212faaa20e76484e62bcb7c23ddb3b3fd",
      "only-arches": [
       "x86_64"
      ],
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/microsoft/onnxruntime/releases/latest",
       "version-query": ".tag_name | sub(\"^v\"; \"\")",
       "url-query": ".assets[] | select(.name == (\"onnxruntime-linux-x64-\" + $version + \".tgz\")) | .browser_download_url\n"
      }
     },
     {
      "type": "archive",
      "url": "https://github.com/microsoft/onnxruntime/releases/download/v1.30.0/onnxruntime-linux-aarch64-1.30.0.tgz",
      "sha256": "e16a27a8ed330bbc698df7330b0cf56e722f354e3bcc92118682c74ef3c3e3da",
      "only-arches": [
       "aarch64"
      ],
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/microsoft/onnxruntime/releases/latest",
       "version-query": ".tag_name | sub(\"^v\"; \"\")",
       "url-query": ".assets[] | select(.name | test(\"onnxruntime-linux-aarch64-.*\\\\.tgz$\")) | .browser_download_url\n"
      }
     }
    ]
   },
   {
    "name": "glaze",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DBUILD_TESTING=OFF"
    ],
    "builddir": true,
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/stephenberry/glaze/archive/v8.4.0.tar.gz",
      "sha256": "4ee6f2ec68e8c763553d6a16e0d79cd51fac7c58cbd98783760f418ce82c9a91",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 377101,
       "url-template": "https://github.com/stephenberry/glaze/archive/v$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "vcmi",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DENABLE_GITVERSION=OFF",
     "-DFORCE_BUNDLED_FL=OFF",
     "-DLIB_DIR=lib",
     "-DENABLE_TEST=0",
     "-DENABLE_GOLDMASTER=ON",
     "-Wno-dev"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/vcmi/vcmi",
      "commit": "6901839ae9760dfcd1d5ff2c4aa4ef6968fee752",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 5456,
       "stable-only": true,
       "tag-template": "$version"
      },
      "tag": "1.7.5"
     },
     {
      "type": "file",
      "path": "add_changelog_to_metainfo.py"
     },
     {
      "type": "inline",
      "dest": "client/lib/discord-presence/cmake",
      "dest-filename": "CPM.cmake",
      "contents": "macro(CPMAddPackage)\nendmacro()\n"
     }
    ],
    "post-install": [
     "cp /app/share/applications/vcmieditor.desktop /app/share/applications/eu.vcmi.VCMI.editor.desktop",
     "sed -i 's|Icon=vcmieditor|Icon=eu.vcmi.VCMI.editor|' /app/share/applications/eu.vcmi.VCMI.editor.desktop",
     "for res in 32 48 64 128 256; do\n  mv /app/share/icons/hicolor/${res}x${res}/apps/vcmieditor.png /app/share/icons/hicolor/${res}x${res}/apps/eu.vcmi.VCMI.editor.png\ndone\n",
     "rm -rf /app/share/icons/hicolor/1024x1024 /app/share/icons/hicolor/2048x2048",
     "cd ${FLATPAK_BUILDER_BUILDDIR} && python3 ${FLATPAK_BUILDER_BUILDDIR}/add_changelog_to_metainfo.py"
    ]
   }
  ]
 }
}