{
 "app_id": "app.xemu.xemu",
 "source_url": "https://raw.githubusercontent.com/flathub/app.xemu.xemu/master/app.xemu.xemu.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",
  "--filesystem=host:ro",
  "--unset-env=QEMU_AUDIO_DRV"
 ],
 "module_count": 6,
 "fetched_at": "2026-09-18T11:40:38.554356+00:00",
 "manifest": {
  "app-id": "app.xemu.xemu",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "xemu",
  "rename-desktop-file": "xemu.desktop",
  "finish-args": [
   "--device=all",
   "--filesystem=host:ro",
   "--share=network",
   "--socket=pulseaudio",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--env=SDL_VIDEODRIVER=wayland,x11",
   "--share=ipc",
   "--unset-env=QEMU_AUDIO_DRV"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/share/man",
   "*.a"
  ],
  "modules": [
   {
    "name": "libpcap",
    "buildsystem": "cmake-ninja",
    "cleanup": [
     "/bin"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://www.tcpdump.org/release/libpcap-1.10.6.tar.gz",
      "sha256": "872dd11337fe1ab02ad9d4fee047c9da244d695c6ddf34e2ebb733efd4ed8aa9",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1702,
       "stable-only": true,
       "url-template": "https://www.tcpdump.org/release/libpcap-$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "libslirp",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "archive",
      "url": "https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v4.9.1/libslirp-v4.9.1.tar.gz",
      "sha256": "3970542143b7c11e6a09a4d2b50f30a133473c41f15ed0bdcc3b7a1c450d9a5c"
     }
    ]
   },
   {
    "name": "PyYAML",
    "buildsystem": "simple",
    "build-commands": [
     "pip install --prefix=/app --no-build-isolation ."
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/yaml/pyyaml/archive/refs/tags/6.0.3.tar.gz",
      "sha256": "c7b45011e052458ae79015d5eea3046c37d099023d4b253dde26ee1c29ea2f36",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 4123,
       "stable-only": true,
       "url-template": "https://github.com/yaml/pyyaml/archive/refs/tags/$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "distlib",
    "buildsystem": "simple",
    "build-commands": [
     "pip install --prefix=/app --no-build-isolation ."
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/pypa/distlib/archive/refs/tags/0.4.3.tar.gz",
      "sha256": "421a2a177a9c6a725d821c27e69e9e06429dd6b9d9c44c51689412fb61936b51",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 34504,
       "stable-only": true,
       "url-template": "https://github.com/pypa/distlib/archive/refs/tags/$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "xxhash",
    "no-autogen": true,
    "make-install-args": [
     "PREFIX=/app"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.3.tar.gz",
      "sha256": "aae608dfe8213dfd05d909a57718ef82f30722c392344583d3f39050c7f29a80",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 17583,
       "stable-only": true,
       "url-template": "https://github.com/Cyan4973/xxHash/archive/refs/tags/v$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "xemu",
    "buildsystem": "autotools",
    "builddir": true,
    "no-make-install": true,
    "build-options": {
     "cflags": "-O3 -DXBOX=1 -Wno-error=redundant-decls"
    },
    "config-opts": [
     "--audio-drv-list=sdl",
     "--disable-werror",
     "--target-list=i386-softmmu"
    ],
    "make-args": [
     "qemu-system-i386"
    ],
    "post-install": [
     "for px in 16 32 48 64 128 256 512; do\n  install -Dm644 ../ui/icons/xemu_${px}x${px}.png $FLATPAK_DEST/share/icons/hicolor/${px}x${px}/apps/app.xemu.xemu.png\ndone",
     "install -Dm644 ../ui/icons/xemu.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/app.xemu.xemu.svg",
     "desktop-file-install ../ui/xemu.desktop --dir $FLATPAK_DEST/share/applications",
     "desktop-file-edit --set-icon=app.xemu.xemu $FLATPAK_DEST/share/applications/xemu.desktop",
     "mv qemu-system-i386 $FLATPAK_DEST/bin/xemu",
     "mkdir -p $FLATPAK_DEST/share/licenses/xemu",
     "cd .. && python3 scripts/gen-license.py > $FLATPAK_DEST/share/licenses/xemu/LICENSE.txt",
     "mkdir $FLATPAK_DEST/share/metainfo",
     "cp ../xemu.metainfo.xml $FLATPAK_DEST/share/metainfo/app.xemu.xemu.metainfo.xml",
     "sed -i 's|</component>|<releases><release date=\"'$(date +%Y-%m-%d)'\" version=\"'$(cat ../XEMU_VERSION)'\"/></releases></component>|' $FLATPAK_DEST/share/metainfo/app.xemu.xemu.metainfo.xml"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/xemu-project/xemu/releases/download/v0.8.136/xemu-0.8.136.tar.zst",
      "sha256": "92a09305a87d7dabaecc335fa54ca888117aab10fe22af6ad73fc0d3cdd20c1f",
      "strip-components": 2,
      "x-checker-data": {
       "type": "json",
       "tag-query": ".tag_name",
       "timestamp-query": ".published_at",
       "is-main-source": true,
       "version-query": ".tag_name",
       "url": "https://api.github.com/repos/xemu-project/xemu/releases/latest",
       "url-query": ".assets[] | select(.name | test(\"^xemu-.*\\\\.tar\\\\.zst\")) | .browser_download_url"
      }
     },
     {
      "type": "patch",
      "path": "add-metainfo-description.patch"
     }
    ]
   }
  ]
 }
}