{
 "app_id": "io.github.srb2.rphys",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.srb2.rphys/master/io.github.srb2.rphys.yml",
 "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": 7,
 "fetched_at": "2026-09-17T16:12:16.794105+00:00",
 "manifest": {
  "app-id": "io.github.srb2.rphys",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "srb2reveries",
  "finish-args": [
   "--share=ipc",
   "--share=network",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--device=all",
   "--persist=.srb2"
  ],
  "modules": [
   {
    "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": "miniupnpc",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DUPNPC_BUILD_SAMPLE=OFF",
     "-DUPNPC_BUILD_SHARED=ON",
     "-DUPNPC_BUILD_TESTS=OFF"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://salsa.debian.org/miniupnp-team/miniupnpc.git",
      "commit": "3ec4dde1a0a489347945fb3bd4291a8517284ddb",
      "tag": "debian/2.3.3-2",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^debian\\/(\\d.+)$"
      }
     }
    ]
   },
   {
    "name": "game-music-emu",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DBUILD_SHARED_LIBS=YES",
     "-DGME_BUILD_STATIC=NO",
     "-DGME_YM2612_EMU=GENS"
    ],
    "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"
      }
     }
    ],
    "cleanup": [
     "/lib/libgme.so",
     "/include/gme",
     "/lib/pkgconfig"
    ]
   },
   {
    "name": "fluidsynth",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/FluidSynth/fluidsynth/archive/v2.6.0.tar.gz",
      "sha256": "6d17570ea2086dd6fbcac995465773a6f316e689089b7fb7ba0b34c2ec6f680d",
      "x-checker-data": {
       "type": "anitya",
       "stable-only": true,
       "url-template": "https://github.com/FluidSynth/fluidsynth/archive/$version.tar.gz"
      }
     },
     {
      "type": "git",
      "url": "https://github.com/kthohr/gcem.git",
      "tag": "v1.18.0",
      "commit": "012ae73c6d0a2cb09ffe86475f5c6fba3926e200",
      "dest": "gcem",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     }
    ]
   },
   {
    "name": "sdl-mixer-x",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DSDL_MIXER_X_SHARED=ON",
     "-DMIXERX_ENABLE_GPL=ON",
     "-DMIXERX_DISABLE_SIMD=ON",
     "-DUSE_SYSTEM_SDL2=ON",
     "-DUSE_MIDI_FLUIDSYNTH=ON",
     "-DUSE_MIDI_FLUIDLITE=OFF"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/WohlSoft/SDL-Mixer-X.git",
      "tag": "2.6.0",
      "commit": "7181c771aa29deaea8bfbe6098613c3a929e9189",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^([\\\\d.]+)$"
      }
     }
    ],
    "cleanup": [
     "/lib/pkgconfig",
     "/lib/libSDL2_mixer_ext.so",
     "/lib/cmake",
     "/include"
    ]
   },
   {
    "name": "srb2",
    "buildsystem": "simple",
    "build-options": {
     "arch": {
      "aarch64": {
       "env": {
        "ARCH_MAKE_ARGS": "LINUX64=1"
       }
      },
      "x86_64": {
       "env": {
        "ARCH_MAKE_ARGS": "LINUX64=1 X86_64=1"
       }
      }
     }
    },
    "build-commands": [
     "install -D -m 644 SDL_mixer.h -t src/",
     "install -D -m 644 SDL_mixer_ext.h -t src/sdl/",
     "make -C src -j $FLATPAK_BUILDER_N_JOBS HAVE_MIXERX=1 $ARCH_MAKE_ARGS",
     "install -D -m 755 -t $FLATPAK_DEST/bin bin/srb2rvre",
     "install -D -m 755 -t $FLATPAK_DEST/bin assets/reveries.pk3",
     "install -D -m 755 -t $FLATPAK_DEST/bin/soundfonts assets/SEGAudio.sf2",
     "install -D -m 644 srb2.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png",
     "install -D -m 755 reveries.sh $FLATPAK_DEST/bin/srb2reveries",
     "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": "file",
      "url": "https://raw.githubusercontent.com/WohlSoft/SDL-Mixer-X/refs/heads/master/include/SDL_mixer_ext/SDL_mixer_ext.h",
      "sha256": "aaec5e563c7e073b3c953f84ad39533124c86bf9b8c31354d737b4d3dc97bc7b"
     },
     {
      "type": "file",
      "url": "https://raw.githubusercontent.com/WohlSoft/SDL-Mixer-X/refs/heads/master/include/SDL_mixer.h",
      "sha256": "9e53177362fde3d7dd1bf255e64d96340fe9b7e72ac13fcb0973226128e84ab0"
     },
     {
      "type": "git",
      "url": "https://github.com/candelavla/srb2",
      "tag": "f7b",
      "commit": "c3d537df19d1be42636bba241cf69a1e7aafb95d"
     },
     {
      "type": "script",
      "commands": [
       "export SRB2WADDIR=/app/bin",
       "srb2rvre +midisoundfont /app/bin/soundfonts/SEGAudio.sf2 +midiplayer Fluidsynth -useUPnP \"$@\""
      ],
      "dest-filename": "reveries.sh"
     },
     {
      "type": "file",
      "path": "io.github.srb2.rphys.desktop"
     },
     {
      "type": "file",
      "path": "io.github.srb2.rphys.metainfo.xml"
     }
    ]
   },
   {
    "name": "srb2assets",
    "buildsystem": "simple",
    "build-commands": [
     "cp -r * $FLATPAK_DEST/bin"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://git.do.srb2.org/STJr/srb2assets-public",
      "tag": "SRB2_release_2.2.15",
      "commit": "f9651218133f1001df39265bb53ac80ff19762a4"
     }
    ]
   }
  ]
 }
}