{
 "app_id": "org.sugarlabs.Chess",
 "source_url": "https://raw.githubusercontent.com/flathub/org.sugarlabs.Chess/master/org.sugarlabs.Chess.json",
 "runtime": "org.gnome.Platform",
 "runtime_version": "50",
 "sdk": "org.gnome.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=x11",
  "--socket=pulseaudio",
  "--device=dri"
 ],
 "module_count": 2,
 "fetched_at": "2026-09-17T16:16:37.312944+00:00",
 "manifest": {
  "app-id": "org.sugarlabs.Chess",
  "base": "org.sugarlabs.BaseApp",
  "base-version": "26.04",
  "runtime": "org.gnome.Platform",
  "runtime-version": "50",
  "sdk": "org.gnome.Sdk",
  "separate-locales": false,
  "command": "sugarapp",
  "finish-args": [
   "--socket=x11",
   "--socket=pulseaudio",
   "--share=ipc",
   "--device=dri",
   "--env=SUGAR_BUNDLE_ID=org.sugarlabs.Chess",
   "--env=SUGAR_BUNDLE_PATH=/app/share/sugar/activities/SugarChess.activity"
  ],
  "cleanup-commands": [
   "rm -rf /app/share/gir-1.0"
  ],
  "modules": [
   {
    "name": "gnuchess",
    "build-options": {
     "ldflags": "-Wl,--allow-multiple-definition",
     "cflags": "-Wno-error=implicit-function-declaration",
     "arch": {
      "aarch64": {
       "config-opts": [
        "--build=arm"
       ]
      }
     }
    },
    "sources": [
     {
      "type": "archive",
      "url": "http://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz",
      "sha256": "c4e49e0dec210f5d131a02ff89588b482787cd702a08456791ba9100b4c6ffc0",
      "x-checker-data": {
       "type": "html",
       "url": "http://ftp.gnu.org/gnu/chess/",
       "versions": {
        "<": "6.0.0"
       },
       "pattern": "<a href=\"(gnuchess-([\\d\\.]+\\d).tar.gz)\">"
      }
     }
    ]
   },
   {
    "name": "sugarchess",
    "buildsystem": "simple",
    "build-commands": [
     "python3 setup.py install --prefix=${FLATPAK_DEST} --skip-install-desktop-file --skip-install-mime"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/sugarlabs/sugarchess.git",
      "tag": "v18",
      "commit": "4501293b6b897d3267f0840a9801131d09572619",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     },
     {
      "type": "patch",
      "path": "chess-port.patch"
     },
     {
      "type": "patch",
      "path": "chess-fix-clip.patch"
     },
     {
      "type": "patch",
      "path": "chess-fix-bin.patch"
     },
     {
      "type": "patch",
      "path": "chess-screen.patch"
     },
     {
      "type": "patch",
      "path": "chess-info.patch"
     }
    ],
    "post-install": [
     "sugarapp-gen-appdata activity/activity.info appdata",
     "sugarapp-gen-desktop activity/activity.info desktop",
     "install -D appdata /app/share/metainfo/org.sugarlabs.Chess.appdata.xml",
     "install -D desktop /app/share/applications/org.sugarlabs.Chess.desktop",
     "install -D activity/activity-gnuchess.svg /app/share/icons/hicolor/scalable/apps/org.sugarlabs.Chess.svg",
     "rm -rf /app/share/sugar/activities/SugarChess.activity/bin"
    ]
   }
  ]
 }
}