{
 "app_id": "org.srb2.SRB2",
 "source_url": "https://raw.githubusercontent.com/flathub/org.srb2.SRB2/master/org.srb2.SRB2.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=all"
 ],
 "module_count": 9,
 "fetched_at": "2026-09-17T16:16:37.312938+00:00",
 "manifest": {
  "app-id": "org.srb2.SRB2",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "release.sh",
  "build-options": {
   "cflags": "-g -O3",
   "cxxflags": "-g -O3 -fpermissive"
  },
  "finish-args": [
   "--share=network",
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--device=all",
   "--env=SRB2WADDIR=/app/share/games/srb2",
   "--persist=.srb2"
  ],
  "modules": [
   {
    "name": "srb2assets",
    "disabled": false,
    "buildsystem": "simple",
    "build-commands": [
     "mkdir --parents $FLATPAK_DEST/share/games/srb2",
     "cp --recursive --target-directory=$FLATPAK_DEST/share/games/srb2 *"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://git.do.srb2.org/STJr/srb2assets-public.git/",
      "tag": "SRB2_release_2.2.15",
      "commit": "f9651218133f1001df39265bb53ac80ff19762a4"
     }
    ]
   },
   "local-modules/libopenmpt.json",
   "local-modules/GPL2-sdl-mixer-x.json",
   "local-modules/miniupnpc.json",
   {
    "name": "srb2",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/STJr/SRB2.git",
      "tag": "SRB2_release_2.2.15",
      "commit": "8701ef41f617c06e23a7b8ccd2199c160c5d1dd1"
     }
    ],
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DSRB2_CONFIG_USE_GME=ON",
     "-DSRB2_CONFIG_DEV_BUILD=OFF",
     "-DSRB2_SDL2_EXE_NAME=lsdlsrb2"
    ],
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "build-options": {
     "cflags": "-g -O3 -std=gnu17"
    },
    "build-commands": [
     "install -D -m 644 $FLATPAK_BUILDER_BUILDDIR/srb2.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png"
    ],
    "post-install": [
     "rm $FLATPAK_DEST/lsdlsrb2",
     "install -D bin/lsdlsrb2.debug -T $FLATPAK_DEST/bin/lsdlsrb2"
    ]
   },
   {
    "name": "soundfont",
    "disabled": false,
    "sources": [
     {
      "type": "file",
      "url": "https://musical-artifacts.com/artifacts/23/8bitsf.SF2",
      "mirror-urls": [
       "https://archive.org/download/free-soundfonts-sf2-2019-04/8bitsf.SF2"
      ],
      "sha256": "3394f3436ffcec4ab094949942dc601d6f20ef4595af3291230b7261ff89bb2c"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "install -D --preserve-timestam --mode=644 8bitsf.SF2 -t $FLATPAK_DEST/share/games/srb2/soundfonts/"
    ]
   },
   {
    "name": "launcher",
    "sources": [
     {
      "type": "file",
      "path": "org.srb2.SRB2.desktop"
     },
     {
      "type": "file",
      "path": "org.srb2.SRB2.metainfo.xml"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "install -D -m 644 $FLATPAK_ID.desktop -t $FLATPAK_DEST/share/applications",
     "install -D -m 644 $FLATPAK_ID.metainfo.xml -t $FLATPAK_DEST/share/metainfo"
    ]
   },
   {
    "name": "release",
    "sources": [
     {
      "type": "script",
      "commands": [
       "exec /app/bin/lsdlsrb2 +midisoundfont /app/share/games/srb2/soundfonts/8bitsf.SF2 +midiplayer Fluidsynth -useUPnP \"$@\""
      ],
      "dest-filename": "release.sh"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "install -D release.sh -t $FLATPAK_DEST/bin"
    ]
   },
   {
    "name": "debug",
    "sources": [
     {
      "type": "script",
      "commands": [
       "exec gdb --ex 'break I_Error' --ex 'start' --quiet --args /app/bin/lsdlsrb2 -nomouse -win -nofork +midisoundfont /app/share/games/srb2/soundfonts/8bitsf.SF2 +midiplayer Fluidsynth -useUPnP \"$@\""
      ],
      "dest-filename": "debug.sh"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "install -D debug.sh -t $FLATPAK_DEST/bin"
    ]
   }
  ]
 }
}