{
 "app_id": "com.github.k4zmu2a.spacecadetpinball",
 "source_url": "https://raw.githubusercontent.com/flathub/com.github.k4zmu2a.spacecadetpinball/master/com.github.k4zmu2a.spacecadetpinball.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=dri"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-17T16:07:39.955325+00:00",
 "manifest": {
  "app-id": "com.github.k4zmu2a.spacecadetpinball",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "SpaceCadetPinball",
  "rename-appdata-file": "SpaceCadetPinball.metainfo.xml",
  "rename-desktop-file": "SpaceCadetPinball.desktop",
  "finish-args": [
   "--socket=pulseaudio",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--device=dri",
   "--env=SDL_SOUNDFONTS=/app/share/soundfonts/default-GM.sf3"
  ],
  "modules": [
   "shared-modules/linux-audio/fluidsynth2.json",
   {
    "name": "SDL2_mixer",
    "buildsystem": "autotools",
    "config-opts": [
     "--disable-static"
    ],
    "cleanup": [
     "/bin",
     "/include",
     "/lib/pkgconfig",
     "/share"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/libsdl-org/SDL_mixer/",
      "tag": "release-2.8.2",
      "commit": "b208916aed9250fe434360e6c6a95f0697bb7b01",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^release-(\\d+.\\d+.\\d+)$",
       "versions": {
        "<": "3"
       }
      }
     }
    ]
   },
   {
    "name": "FluidR3Mono",
    "buildsystem": "simple",
    "build-commands": [
     "install -D -m 644 -t $FLATPAK_DEST/share/soundfonts FluidR3Mono_GM.sf3",
     "ln -s $FLATPAK_DEST/share/soundfonts/{FluidR3Mono_GM,default-GM}.sf3"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://github.com/musescore/MuseScore/raw/3.6.2/share/sound/FluidR3Mono_GM.sf3",
      "sha256": "2aacd036d7058d40a371846ef2f5dc5f130d648ab3837fe2626591ba49a71254"
     }
    ]
   },
   {
    "name": "Pinball",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "post-install": [
     "cat assets_list | while read line; do ln -s ${FLATPAK_DEST}/extra/Pinball/$line ${FLATPAK_DEST}/bin/; done",
     "install -Dm755 apply_extra ${FLATPAK_DEST}/bin/apply_extra",
     "install -Dm755 bin/SpaceCadetPinball -t ${FLATPAK_DEST}/bin/",
     "install -Dm644 Platform/Linux/SpaceCadetPinball.desktop -t ${FLATPAK_DEST}/share/applications/",
     "install -Dm644 Platform/Linux/SpaceCadetPinball.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/",
     "sed -i -e \"s/SpaceCadetPinball.desktop/${FLATPAK_ID}.desktop/g\"  ${FLATPAK_DEST}/share/metainfo/SpaceCadetPinball.metainfo.xml",
     "sed -i -e \"s/Icon=SpaceCadetPinball/Icon=${FLATPAK_ID}/g\"  ${FLATPAK_DEST}/share/applications/SpaceCadetPinball.desktop",
     "install -Dm644 SpaceCadetPinball/Icon_16x16.png ${FLATPAK_DEST}/share/icons/hicolor/16x16/apps/${FLATPAK_ID}.png",
     "install -Dm644 SpaceCadetPinball/Icon_32x32.png ${FLATPAK_DEST}/share/icons/hicolor/32x32/apps/${FLATPAK_ID}.png",
     "install -Dm644 SpaceCadetPinball/Icon_48x48.png ${FLATPAK_DEST}/share/icons/hicolor/48x48/apps/${FLATPAK_ID}.png",
     "install -Dm644 SpaceCadetPinball/Icon_128x128.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/${FLATPAK_ID}.png",
     "install -Dm644 SpaceCadetPinball/Icon_192x192.png ${FLATPAK_DEST}/share/icons/hicolor/192x192/apps/${FLATPAK_ID}.png"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/k4zmu2a/SpaceCadetPinball",
      "commit": "cb9b7b886244a27773f66b0b19fdc2998392565e"
     },
     {
      "type": "patch",
      "path": "0001-Remove-deprecated-metainfo.patch"
     },
     {
      "type": "file",
      "path": "assets_list"
     },
     {
      "type": "extra-data",
      "filename": "pinball.zip",
      "url": "https://archive.org/download/pinball_202007/Pinball.zip",
      "sha256": "1078b6ec75a36b5585061d1ebdd3f27019d97c1ab7c5a4bb9f1159932aae3109",
      "size": 1276182
     },
     {
      "type": "script",
      "dest-filename": "apply_extra",
      "commands": [
       "unzip -q pinball.zip",
       "rm pinball.zip"
      ]
     }
    ]
   }
  ]
 }
}