{
 "app_id": "com.play0ad.zeroad",
 "source_url": "https://raw.githubusercontent.com/flathub/com.play0ad.zeroad/master/com.play0ad.zeroad.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"
 ],
 "module_count": 8,
 "fetched_at": "2026-09-17T16:08:33.468005+00:00",
 "manifest": {
  "app-id": "com.play0ad.zeroad",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.rust-stable",
   "org.freedesktop.Sdk.Extension.llvm22"
  ],
  "command": "0ad",
  "finish-args": [
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--device=dri",
   "--socket=pulseaudio",
   "--share=network",
   "--env=SDL_VIDEODRIVER=wayland,x11"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "*.a",
   "*.la"
  ],
  "modules": [
   {
    "name": "boost",
    "buildsystem": "simple",
    "build-commands": [
     "./bootstrap.sh --prefix=/app --with-libraries=headers",
     "./b2 -j $FLATPAK_BUILDER_N_JOBS install"
    ],
    "sources": [
     {
      "sha256": "5c1d40cb8e19adbf740a4ec2da35b3e58f3f5804b1dce44deb53df72193cbc6c",
      "type": "archive",
      "url": "https://archives.boost.io/release/1.92.0/source/boost_1_92_0.tar.bz2",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 6845,
       "stable-only": true,
       "url-template": "https://archives.boost.io/release/$version/source/boost_${major}_${minor}_${patch}.tar.bz2"
      }
     }
    ]
   },
   {
    "name": "gloox",
    "sources": [
     {
      "sha256": "591bd12c249ede0b50a1ef6b99ac0de8ef9c1ba4fd2e186f97a740215cc5966c",
      "type": "archive",
      "url": "https://releases.wildfiregames.com/libs/gloox-1.0.28.tar.bz2",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 7318,
       "url-template": "https://releases.wildfiregames.com/libs/gloox-$version.tar.bz2"
      }
     }
    ]
   },
   {
    "name": "enet",
    "sources": [
     {
      "sha256": "28603c895f9ed24a846478180ee72c7376b39b4bb1287b73877e5eae7d96b0dd",
      "type": "archive",
      "url": "https://github.com/lsalzman/enet/archive/v1.3.18.tar.gz",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 696,
       "url-template": "https://github.com/lsalzman/enet/archive/v$version.tar.gz"
      }
     },
     {
      "type": "script",
      "dest-filename": "autogen.sh",
      "commands": [
       "autoreconf -ifv"
      ]
     }
    ]
   },
   {
    "name": "miniupnpc",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "archive",
      "sha256": "d52a0afa614ad6c088cc9ddff1ae7d29c8c595ac5fdd321170a05f41e634bd1a",
      "url": "https://miniupnp.tuxfamily.org/files/miniupnpc-2.3.3.tar.gz",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1986,
       "url-template": "https://miniupnp.tuxfamily.org/files/miniupnpc-$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "libsodium",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/jedisct1/libsodium.git",
      "tag": "1.0.22-RELEASE",
      "commit": "77e1ce5d6dee871c49ef211222ba18ef0c486bda",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "([\\d.]+)-RELEASE"
      }
     }
    ]
   },
   {
    "name": "wxWidgets",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/wxWidgets/wxWidgets/releases/download/v3.3.3/wxWidgets-3.3.3.tar.bz2",
      "sha256": "81b09d6dd9f1ed9301f8c55a968a488d0491f264dc2bab19a7e407ac67009482",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 5150,
       "url-template": "https://github.com/wxWidgets/wxWidgets/releases/download/v$version/wxWidgets-$version.tar.bz2"
      }
     }
    ]
   },
   {
    "name": "cbindgen",
    "buildsystem": "simple",
    "build-commands": [
     "cargo --offline fetch --manifest-path Cargo.toml --verbose",
     "cargo --offline build --release --verbose",
     "install -Dm 755 target/release/cbindgen -t /app/bin"
    ],
    "build-options": {
     "append-path": "/usr/lib/sdk/rust-stable/bin",
     "env": {
      "CARGO_HOME": "/run/build/cbindgen/cargo"
     }
    },
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/mozilla/cbindgen.git",
      "tag": "v0.29.4",
      "commit": "b826cb8911488fe8a209d2b693492c0c673e8cca",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     },
     "cbindgen-sources.json"
    ]
   },
   {
    "name": "0ad",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm22/bin",
     "env": {
      "TAR_OPTIONS": "--no-same-owner"
     }
    },
    "build-commands": [
     "rustc --version",
     "python3 --version",
     "libraries/build-source-libs.sh -j$FLATPAK_BUILDER_N_JOBS",
     "build/workspaces/update-workspaces.sh --without-tests -j$FLATPAK_BUILDER_N_JOBS --bindir=/app/bin --libdir=/app/lib --datadir=/app/share/games/0ad/",
     "make -C build/workspaces/gcc config=release -j$FLATPAK_BUILDER_N_JOBS"
    ],
    "post-install": [
     "mkdir -p /app/share/games/0ad",
     "mv binaries/system/lib* /app/lib/",
     "install -D -t /app/bin binaries/system/pyrogenesis",
     "install -Dm644 build/resources/0ad.appdata.xml /app/share/metainfo/com.play0ad.zeroad.appdata.xml",
     "sed -i 's|0ad.desktop|com.play0ad.zeroad.desktop|g' /app/share/metainfo/com.play0ad.zeroad.appdata.xml",
     "install -Dm644 build/resources/0ad.desktop /app/share/applications/com.play0ad.zeroad.desktop",
     "install -Dm644 build/resources/0ad.png /app/share/icons/hicolor/128x128/apps/com.play0ad.zeroad.png",
     "install -D build/resources/0ad.sh /app/bin/0ad",
     "desktop-file-edit --set-key=Icon --set-value='com.play0ad.zeroad' /app/share/applications/com.play0ad.zeroad.desktop",
     "mv binaries/data/* /app/share/games/0ad"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://releases.wildfiregames.com/0ad-0.28.0-unix-build.tar.xz",
      "sha256": "27e217755ef76a922fe58dbf593d96e54b6ed2375d23f548c35619aa6bd5a42a",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 5830,
       "url-template": "https://releases.wildfiregames.com/0ad-$version-unix-build.tar.xz"
      }
     },
     {
      "type": "archive",
      "url": "https://releases.wildfiregames.com/0ad-0.28.0-unix-data.tar.xz",
      "sha256": "e844b30ae2102c47e0a4fff2f0e0ef05ba0cebb1890aa72276fa12457c39526f",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 5830,
       "url-template": "https://releases.wildfiregames.com/0ad-$version-unix-data.tar.xz"
      }
     },
     {
      "type": "patch",
      "paths": [
       "patches/0001-Fix-search-path-for-pyrogenesis-Modify-launcher-scri.patch",
       "patches/0002-Disable-SpiderMonkey-s-debug-build.patch",
       "patches/0003-Add-vcs-browser-to-appdata.patch"
      ]
     }
    ]
   }
  ]
 }
}