{
 "app_id": "org.srb2.SRB2Persona",
 "source_url": "https://raw.githubusercontent.com/flathub/org.srb2.SRB2Persona/master/org.srb2.SRB2Persona.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=all"
 ],
 "module_count": 5,
 "fetched_at": "2026-09-17T16:16:37.312941+00:00",
 "manifest": {
  "app-id": "org.srb2.SRB2Persona",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "srb2persona",
  "finish-args": [
   "--share=ipc",
   "--share=network",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--socket=wayland",
   "--device=all",
   "--persist=.srb2"
  ],
  "modules": [
   "shared-modules/glu/glu-9.json",
   {
    "name": "game-music-emu",
    "buildsystem": "cmake-ninja",
    "cleanup": [
     "/include",
     "/lib/*.so",
     "/lib/pkgconfig"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/libgme/game-music-emu/archive/refs/tags/0.6.5.tar.gz",
      "sha256": "8531678502451c2cf04248cda45c8b4645e19fcfb63e6a7ec2549641c47bb392",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 866,
       "stable-only": true,
       "url-template": "https://github.com/libgme/game-music-emu/archive/refs/tags/$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "libopenmpt",
    "config-opts": [
     "--disable-examples",
     "--disable-openmpt123",
     "--disable-static",
     "--disable-tests",
     "--without-portaudio",
     "--without-portaudiocpp"
    ],
    "cleanup": [
     "/include",
     "/lib/*.la",
     "/lib/*.so",
     "/lib/pkgconfig",
     "/share/doc"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.8.9+release.autotools.tar.gz",
      "sha256": "d7ce84fd05d686c4bcf66af40eae857afa371442db60eeda3f874bd6cf6fc318",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 141468,
       "stable-only": true,
       "url-template": "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-$version+release.autotools.tar.gz"
      }
     }
    ]
   },
   {
    "name": "srb2persona",
    "buildsystem": "simple",
    "build-options": {
     "arch": {
      "aarch64": {
       "env": {
        "ARCH_MAKE_ARGS": "LINUX64=1",
        "CFLAGS": "-std=gnu11"
       }
      },
      "x86_64": {
       "env": {
        "ARCH_MAKE_ARGS": "LINUX64=1 X86_64=1",
        "CFLAGS": "-std=gnu11"
       }
      }
     }
    },
    "build-commands": [
     "make -C src -j $FLATPAK_BUILDER_N_JOBS NOUPX=1 SDL=1 $ARCH_MAKE_ARGS",
     "install -D -m 755 -t $FLATPAK_DEST/bin bin/lsdl2srb2",
     "install -D -m 644 srb2.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png",
     "install -D -m 755 srb2persona.sh $FLATPAK_DEST/bin/srb2persona",
     "install -D -m 644 -t $FLATPAK_DEST/share/applications $FLATPAK_ID.desktop",
     "install -D -m 644 -t $FLATPAK_DEST/share/metainfo $FLATPAK_ID.metainfo.xml"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://git.do.srb2.org/SinnamonLat/SRB2",
      "tag": "SRB2P-exe-1.3.6",
      "commit": "19e6daf275933e68648265c53760de1f77c2b2b2"
     },
     {
      "type": "patch",
      "path": "srb2-gcc.patch"
     },
     {
      "type": "patch",
      "path": "sdk25-fix.patch"
     },
     {
      "type": "script",
      "commands": [
       "export SRB2WADDIR=/app/extra",
       "lsdl2srb2 \"$@\""
      ],
      "dest-filename": "srb2persona.sh"
     },
     {
      "type": "file",
      "path": "org.srb2.SRB2Persona.desktop"
     },
     {
      "type": "file",
      "path": "org.srb2.SRB2Persona.metainfo.xml"
     }
    ]
   },
   {
    "name": "srb2persona-assets",
    "buildsystem": "simple",
    "build-commands": [
     "install -t $FLATPAK_DEST/bin apply_extra"
    ],
    "sources": [
     {
      "type": "extra-data",
      "filename": "Full.zip",
      "url": "https://github.com/flathub/org.srb2.SRB2Persona/releases/download/v1.3.6/srb2p-assets.zip",
      "sha256": "6309a48b621ccb9bcebdb270a90babe310af23242cbce08c7346517162f63a66",
      "size": 122026463
     },
     {
      "type": "script",
      "commands": [
       "unzip Full.zip > /dev/null && rm Full.zip"
      ],
      "dest-filename": "apply_extra"
     }
    ]
   }
  ]
 }
}