{
 "app_id": "info.beyondallreason.bar",
 "source_url": "https://raw.githubusercontent.com/flathub/info.beyondallreason.bar/master/info.beyondallreason.bar.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=pulseaudio",
  "--device=dri",
  "--filesystem=xdg-run/app/com.discordapp.Discord:create"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-17T16:10:04.899227+00:00",
 "manifest": {
  "app-id": "info.beyondallreason.bar",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "run.sh",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node20"
  ],
  "build-options": {
   "append_path": "/usr/lib/sdk/node20/bin",
   "cflags": "-O2 -g",
   "cxxflags": "-O2 -g",
   "env": {
    "npm_config_nodedir": "/usr/lib/sdk/node20",
    "npm_config_offline": "true",
    "NPM_CONFIG_LOGLEVEL": "info",
    "XDG_CACHE_HOME": "/run/build/spring-launcher/flatpak-node/cache",
    "npm_config_cache": "/run/build/spring-launcher/flatpak-node/npm-cache",
    "GITHUB_REPOSITORY": "beyond-all-reason/BYAR-Chobby"
   }
  },
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--socket=pulseaudio",
   "--device=dri",
   "--share=network",
   "--env=PATH=/usr/bin:/app/bin:/usr/lib/sdk/node20/bin",
   "--filesystem=xdg-run/app/com.discordapp.Discord:create"
  ],
  "cleanup": [
   "/chobby"
  ],
  "modules": [
   {
    "name": "chobby",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/beyond-all-reason/BYAR-Chobby",
      "commit": "eece9ffed260ff110ec2cc31fac25c4daf7a9c51",
      "disable-shallow-clone": true
     }
    ],
    "build-commands": [
     "mkdir -p /app/chobby\necho \"1.$(git rev-list --count HEAD).0\" > /app/chobby/PACKAGE_VERSION\ncp -r dist_cfg /app/chobby\ncp -r build /app/chobby\n"
    ]
   },
   {
    "name": "spring-launcher",
    "buildsystem": "simple",
    "build-commands": [
     "cp -r /app/chobby/dist_cfg/* src/\nfor dir in bin files build; do\n  mkdir -p $dir\n  if [ -d src/$dir/ ]; then\n    mv src/$dir/* $dir/\n    rm -rf src/$dir\n  fi\ndone\n",
     "export PACKAGE_VERSION=$(cat /app/chobby/PACKAGE_VERSION)\necho \"Making build for version: $PACKAGE_VERSION\"\nnode /app/chobby/build/make_package_json.js package.json /app/chobby/dist_cfg/config.json $GITHUB_REPOSITORY $PACKAGE_VERSION\n",
     "jq '.build.linux.target=\"dir\"' <<<$(<package.json) > package.json\njq '.build.files+=[\"!flatpak-node/**\"]' <<<$(<package.json) > package.json\ncat package.json\n",
     "npm ci --ignore-scripts\n",
     ". flatpak-node/electron-builder-arch-args.sh\nnode_modules/.bin/electron-builder -- $ELECTRON_BUILDER_ARCH_ARGS --linux --dir\n",
     "cp -a dist/linux*unpacked /app/main\n"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/beyond-all-reason/spring-launcher",
      "commit": "2c0a6e17b50ab04ea592c53963c571e5ccb071ba"
     },
     "generated-sources.json"
    ],
    "build-options": {
     "env": {
      "XDG_CACHE_HOME": "/run/build/spring-launcher/flatpak-node/cache",
      "npm_config_cache": "/run/build/spring-launcher/flatpak-node/npm-cache",
      "npm_config_nodedir": "/usr/lib/sdk/node20",
      "npm_config_offline": "true"
     }
    }
   },
   {
    "name": "main",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm755 -t /app/bin/ run.sh\ninstall -Dm644 /app/chobby/dist_cfg/build/icon.png /app/share/icons/hicolor/128x128/apps/info.beyondallreason.bar.png\ninstall -Dm644 info.beyondallreason.bar.desktop /app/share/applications/info.beyondallreason.bar.desktop\ninstall -Dm644 info.beyondallreason.bar.metainfo.xml /app/share/metainfo/info.beyondallreason.bar.metainfo.xml\n",
     "cp /usr/bin/addr2line /app/bin\ncp /lib/x86_64-linux-gnu/libbfd* /app/lib\ncp /usr/lib/x86_64-linux-gnu/libsframe* /app/lib\n"
    ],
    "sources": [
     {
      "type": "file",
      "path": "info.beyondallreason.bar.desktop"
     },
     {
      "type": "file",
      "path": "info.beyondallreason.bar.metainfo.xml"
     },
     {
      "type": "file",
      "path": "run.sh"
     }
    ]
   }
  ]
 }
}