{
 "app_id": "org.openttd.OpenTTD",
 "source_url": "https://raw.githubusercontent.com/flathub/org.openttd.OpenTTD/master/org.openttd.OpenTTD.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=dri",
  "--filesystem=home"
 ],
 "module_count": 6,
 "fetched_at": "2026-09-17T16:16:16.067825+00:00",
 "manifest": {
  "app-id": "org.openttd.OpenTTD",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "openttd",
  "rename-icon": "openttd",
  "rename-desktop-file": "openttd.desktop",
  "finish-args": [
   "--device=dri",
   "--filesystem=home",
   "--share=ipc",
   "--share=network",
   "--socket=pulseaudio",
   "--socket=wayland",
   "--socket=fallback-x11"
  ],
  "modules": [
   "shared-modules/linux-audio/fluidsynth2.json",
   {
    "name": "opl3-soundfont",
    "buildsystem": "simple",
    "build-commands": [
     "install -D -m 644 -t $FLATPAK_DEST/share/soundfonts OPL-3_FM_128M.sf2",
     "install -D -m 644 -t $FLATPAK_DEST/share/licenses/$FLATPAK_ID/opl3-soundfont LICENSE",
     "ln -s $FLATPAK_DEST/share/soundfonts/{OPL-3_FM_128M,default}.sf2"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://gitlab.com/psi29a/opl3-soundfont/-/archive/1.1/opl3-soundfont-1.1.tar.gz",
      "sha256": "990f2a1bc96c77892511e973beb97dc61e6aea9b5ff76af73999816bac7b45a1",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^([0-9.]+)$",
       "url-template": "https://gitlab.com/psi29a/opl3-soundfont/-/archive/$version/opl3-soundfont-$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "openttd",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo",
     "-DCMAKE_INSTALL_BINDIR:STRING=bin"
    ],
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "license-files": [
     "COPYING.md"
    ],
    "post-install": [
     "install -D -m 644 -t $FLATPAK_DEST/share/icons/hicolor/scalable/apps ../media/openttd.svg",
     "install -D -m 644 -t $FLATPAK_DEST/share/metainfo ../org.openttd.OpenTTD.metainfo.xml"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://cdn.openttd.org/openttd-releases/15.3/openttd-15.3-source.tar.xz",
      "sha256": "5ea21eea7d59c78a42071924ac18c6bc0116088f2e96b14cfee9369175973be7",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 8640,
       "stable-only": true,
       "url-template": "https://cdn.openttd.org/openttd-releases/$version/openttd-$version-source.tar.xz",
       "is-main-source": true
      }
     },
     {
      "type": "file",
      "path": "org.openttd.OpenTTD.metainfo.xml"
     }
    ]
   },
   {
    "name": "openttd-opengfx",
    "buildsystem": "simple",
    "build-commands": [
     "tar -x -f opengfx-*.tar && rm opengfx-*.tar",
     "mv opengfx-* $FLATPAK_DEST/share/games/openttd/baseset/opengfx"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://cdn.openttd.org/opengfx-releases/8.0/opengfx-8.0-all.zip",
      "sha256": "43a0c1dabf39cb865394f3a6cc36d4da5c10ecfaaf55652043104806810903be",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 9200,
       "stable-only": true,
       "url-template": "https://cdn.openttd.org/opengfx-releases/$version/opengfx-$version-all.zip"
      }
     }
    ]
   },
   {
    "name": "openttd-openmsx",
    "buildsystem": "simple",
    "build-commands": [
     "tar -x -f openmsx-*.tar && rm openmsx-*.tar",
     "mv openmsx-* $FLATPAK_DEST/share/games/openttd/baseset/openmsx"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://cdn.openttd.org/openmsx-releases/0.4.2/openmsx-0.4.2-all.zip",
      "sha256": "5a4277a2e62d87f2952ea5020dc20fb2f6ffafdccf9913fbf35ad45ee30ec762",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 88822,
       "stable-only": true,
       "url-template": "https://cdn.openttd.org/openmsx-releases/$version/openmsx-$version-all.zip"
      }
     }
    ]
   },
   {
    "name": "openttd-opensfx",
    "buildsystem": "simple",
    "build-commands": [
     "tar -x -f opensfx-*.tar && rm opensfx-*.tar",
     "mv opensfx-* $FLATPAK_DEST/share/games/openttd/baseset/opensfx"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://cdn.openttd.org/opensfx-releases/1.0.3/opensfx-1.0.3-all.zip",
      "sha256": "e0a218b7dd9438e701503b0f84c25a97c1c11b7c2f025323fb19d6db16ef3759",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 88821,
       "stable-only": true,
       "url-template": "https://cdn.openttd.org/opensfx-releases/$version/opensfx-$version-all.zip"
      }
     }
    ]
   }
  ]
 }
}