{
 "app_id": "io.github.mrmyhuang.cbetar2",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.mrmyhuang.cbetar2/master/io.github.mrmyhuang.cbetar2.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--filesystem=home"
 ],
 "module_count": 2,
 "fetched_at": "2026-09-17T16:11:46.660376+00:00",
 "manifest": {
  "app-id": "io.github.mrmyhuang.cbetar2",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node24"
  ],
  "command": "run.sh",
  "separate-locales": false,
  "finish-args": [
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--share=network",
   "--filesystem=home"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/node24/bin",
   "env": {
    "NPM_CONFIG_LOGLEVEL": "info"
   }
  },
  "modules": [
   {
    "name": "yarn",
    "buildsystem": "simple",
    "build-commands": [
     "cp -a * /app"
    ],
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-v1.22.19.tar.gz",
      "sha256": "732620bac8b1690d507274f025f3c6cfdc3627a84d9642e38a07452cc00e0f2e"
     }
    ]
   },
   {
    "name": "cbetar2",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/usr/lib/sdk/node24/bin:/app/yarn/bin",
     "env": {
      "XDG_CACHE_HOME": "/run/build/cbetar2/flatpak-node/cache",
      "npm_config_cache": "/run/build/cbetar2/flatpak-node/npm-cache",
      "npm_config_nodedir": "/usr/lib/sdk/node24",
      "npm_config_offline": "true"
     }
    },
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/MrMYHuang/cbetar2",
      "tag": "24.0.0",
      "commit": "12d4ef2ae1ade3f11224b31fd07b833eec526de0"
     },
     "generated-sources.json",
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "if [ -n \"$WAYLAND_DISPLAY\" ] && [ -S \"${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}\" ]; then",
       "exec zypak-wrapper.sh /app/main/cbetar2 \"$@\"",
       "else",
       "exec zypak-wrapper.sh /app/main/cbetar2 --ozone-platform=x11 \"$@\"",
       "fi"
      ]
     }
    ],
    "build-commands": [
     "install -Dm755 -t /app/bin/ run.sh",
     "# Install npm dependencies\nHOME=$PWD yarn config --offline set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror\nyarn --offline\n. ./flatpak-node/electron-builder-arch-args.sh\ninstall -D -t ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps buildElectron/io.github.mrmyhuang.cbetar2.png\ninstall -D -t ${FLATPAK_DEST}/share/applications buildElectron/io.github.mrmyhuang.cbetar2.desktop\ninstall -Dm644 -t ${FLATPAK_DEST}/share/metainfo buildElectron/io.github.mrmyhuang.cbetar2.metainfo.xml\n# https://github.com/flatpak/flatpak-builder-tools/pull/260\nln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp\nyarn run --offline dist-flatpak -- $ELECTRON_BUILDER_ARCH_ARGS\n",
     "cp -a dist/linux*unpacked /app/main"
    ]
   }
  ]
 }
}