{
 "app_id": "org.yamagi.YamagiQ2",
 "source_url": "https://raw.githubusercontent.com/flathub/org.yamagi.YamagiQ2/master/org.yamagi.YamagiQ2.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=dri",
  "--device=all"
 ],
 "module_count": 9,
 "fetched_at": "2026-09-17T16:17:03.034501+00:00",
 "manifest": {
  "app-id": "org.yamagi.YamagiQ2",
  "runtime": "org.freedesktop.Platform",
  "sdk": "org.freedesktop.Sdk",
  "runtime-version": "25.08",
  "command": "YamagiQ2.sh",
  "rename-icon": "Quake2",
  "finish-args": [
   "--socket=wayland",
   "--socket=fallback-x11",
   "--device=dri",
   "--share=ipc",
   "--share=network",
   "--socket=pulseaudio",
   "--persist=.yq2",
   "--device=all"
  ],
  "cleanup": [
   "/include",
   "/lib/*.a",
   "/lib/*.la",
   "/lib/pkgconfig"
  ],
  "modules": [
   {
    "name": "yamagi",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "build-commands": [
     "mv ./release/ /app/bin/",
     "install -Dm 644 ./stuff/icon/Quake2.svg /app/share/icons/hicolor/scalable/apps/Quake2.svg",
     "install -D ./stuff/mapfixes/baseq2/base2@0ae9.ent /app/bin/baseq2/maps/base2@0ae9.ent",
     "install -D ./stuff/mapfixes/baseq2/base3@1597.ent /app/bin/baseq2/maps/base3@1597.ent",
     "install -D ./stuff/mapfixes/baseq2/biggun@2c96.ent /app/bin/baseq2/maps/biggun@2c96.ent",
     "install -D ./stuff/mapfixes/baseq2/city1@1555.ent /app/bin/baseq2/maps/city1@1555.ent",
     "install -D ./stuff/mapfixes/baseq2/city2@4cc5.ent /app/bin/baseq2/maps/city2@4cc5.ent",
     "install -D ./stuff/mapfixes/baseq2/city3@1de5.ent /app/bin/baseq2/maps/city3@1de5.ent",
     "install -D ./stuff/mapfixes/baseq2/cool1@0250.ent /app/bin/baseq2/maps/cool1@0250.ent",
     "install -D ./stuff/mapfixes/baseq2/hangar1@09a0.ent /app/bin/baseq2/maps/hangar1@09a0.ent",
     "install -D ./stuff/mapfixes/baseq2/jail5@2ec5.ent /app/bin/baseq2/maps/jail5@2ec5.ent",
     "install -D ./stuff/mapfixes/baseq2/lab@c170.ent /app/bin/baseq2/maps/lab@c170.ent",
     "install -D ./stuff/mapfixes/baseq2/train@07c2.ent /app/bin/baseq2/maps/train@07c2.ent",
     "install -D ./stuff/mapfixes/baseq2/waste3@6a93.ent /app/bin/baseq2/maps/waste3@6a93.ent",
     "install -D ./stuff/mapfixes/juggernaut/jug13@7ed4.ent /app/bin/juggernaut/maps/jug13@7ed4.ent",
     "install -D ./stuff/mapfixes/juggernaut/jug19@a903.ent /app/bin/juggernaut/maps/jug19@a903.ent"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/yquake2/yquake2/archive/refs/tags/QUAKE2_8_51.tar.gz",
      "sha256": "54c530305dd96cf4536dee3633864f3e326a5efd33528314ac64e009201318e7",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 12336,
       "url-template": "https://github.com/yquake2/yquake2/archive/refs/tags/QUAKE2_$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "rogue",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "build-commands": [
     "install -D ./game.so /app/bin/rogue/game.so",
     "install -D ./stuff/mapfixes/rammo1.ent /app/bin/rogue/maps/rammo1.ent",
     "install -D ./stuff/mapfixes/rhangar2.ent /app/bin/rogue/maps/rhangar2.ent",
     "install -D ./stuff/mapfixes/rmine1.ent /app/bin/rogue/maps/rmine1.ent",
     "install -D ./stuff/mapfixes/rsewer2.ent /app/bin/rogue/maps/rsewer2.ent",
     "install -D ./stuff/mapfixes/rware2.ent /app/bin/rogue/maps/rware2.ent"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/yquake2/rogue/archive/refs/tags/ROGUE_2_14.tar.gz",
      "sha256": "5026a0ba9f9c91cd038f7ca3f45848ea4a579b86701f13126af01ba81b52a59d"
     }
    ]
   },
   {
    "name": "xatrix",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "build-commands": [
     "install -D ./game.so /app/bin/xatrix/game.so",
     "install -D ./stuff/mapfixes/industry.ent /app/bin/xatrix/maps/industry.ent",
     "install -D ./stuff/mapfixes/w_treat.ent /app/bin/xatrix/maps/w_treat.ent",
     "install -D ./stuff/mapfixes/xintell.ent /app/bin/xatrix/maps/xintell.ent"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/yquake2/xatrix/archive/refs/tags/XATRIX_2_15.tar.gz",
      "sha256": "23d173d6fb7c7fbf1a509d41fdffcad2af21c0ef346910af764c0877e618373c"
     }
    ]
   },
   {
    "name": "zaero",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "build-commands": [
     "install -D ./game.so /app/bin/zaero/game.so",
     "install -D ./stuff/mapfixes/zdef4.ent /app/bin/zaero/maps/zdef4.ent",
     "install -D ./stuff/mapfixes/ztomb3.ent /app/bin/zaero/maps/ztomb3.ent",
     "install -D ./stuff/mapfixes/zwaste1.ent /app/bin/zaero"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/yquake2/zaero.git",
      "commit": "9493623a37737d10ab3a243d7d0a1436bfc7bd89"
     }
    ]
   },
   {
    "name": "ctf",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "build-commands": [
     "install -D ./game.so /app/bin/ctf/game.so"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/yquake2/ctf/archive/refs/tags/CTF_1_12.tar.gz",
      "sha256": "0c5ba7e2580a9e7fb7de935b6e39a8cb76d0db5aa058e1e077a4171d3399ea10"
     }
    ]
   },
   {
    "name": "vulkan",
    "buildsystem": "simple",
    "build-commands": [
     "make",
     "install -D ./release/ref_vk.so /app/bin/ref_vk.so"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/yquake2/ref_vk/archive/refs/tags/v1.0.10.tar.gz",
      "sha256": "52e1078bd0c85183baae30fc899269551ca3ff1c4251e4a96416f7a0bf4eae95"
     }
    ]
   },
   {
    "name": "gl4",
    "buildsystem": "simple",
    "build-commands": [
     "make",
     "install -D ./release/ref_gl4.so /app/bin/ref_gl4.so"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/yquake2/ref_gl4",
      "commit": "3bb925b3cd07d7b14dc7b44b45950bd42ebd0642"
     }
    ]
   },
   {
    "name": "footsteps",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "file",
      "url": "https://deponie.yamagi.org/quake2/assets/footsteps.pkz",
      "sha256": "c9377846711b194f4bc1d848d9d3378ae2f94211f52f1503184dd33db7a6bcd4"
     }
    ],
    "build-commands": [
     "install -D ./footsteps.pkz /app/bin/baseq2/footsteps.pkz"
    ]
   },
   {
    "name": "launcher",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "script",
      "dest-filename": "YamagiQ2.sh",
      "commands": [
       "ls ~/.yq2/baseq2/pak0.pak || zenity --error --text \"Game data (/baseq2/ etc.)  must be added to:\\n~/.var/app/org.yamagi.YamagiQ2/.yq2/baseq2/\" --ok-label \"Close\" --width=400",
       "exec /app/bin/quake2 \"$@\""
      ]
     },
     {
      "type": "file",
      "path": "org.yamagi.YamagiQ2.desktop"
     },
     {
      "type": "file",
      "path": "org.yamagi.YamagiQ2.appdata.xml"
     }
    ],
    "build-commands": [
     "install -Dm 744 YamagiQ2.sh -t /app/bin",
     "install -Dm 644 org.yamagi.YamagiQ2.desktop -t /app/share/applications",
     "install -Dm 644 org.yamagi.YamagiQ2.appdata.xml -t /app/share/metainfo"
    ]
   }
  ]
 }
}