{
 "app_id": "cc.craftos_pc.CraftOS-PC",
 "source_url": "https://raw.githubusercontent.com/flathub/cc.craftos_pc.CraftOS-PC/master/cc.craftos_pc.CraftOS-PC.yaml",
 "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",
  "--device=dri"
 ],
 "module_count": 7,
 "fetched_at": "2026-09-17T16:06:42.467284+00:00",
 "manifest": {
  "app-id": "cc.craftos_pc.CraftOS-PC",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "start-craftos",
  "cleanup": [
   "/include",
   "*.cmake"
  ],
  "finish-args": [
   "--share=ipc",
   "--share=network",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--device=dri"
  ],
  "rename-desktop-file": "CraftOS-PC.desktop",
  "rename-appdata-file": "CraftOS-PC.appdata.xml",
  "modules": [
   {
    "name": "poco",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DENABLE_ENCODINGS=OFF",
     "-DENABLE_ACTIVERECORD=OFF",
     "-DENABLE_ACTIVERECORD_COMPILER=OFF",
     "-DENABLE_MONGODB=OFF",
     "-DENABLE_DATA_SQLITE=OFF",
     "-DENABLE_REDIS=OFF",
     "-DENABLE_PROMETHEUS=OFF",
     "-DENABLE_PDF=OFF",
     "-DENABLE_ZIP=OFF",
     "-DENABLE_PAGECOMPILER=OFF",
     "-DENABLE_PAGECOMPILER_FILE2PAGE=OFF"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://pocoproject.org/releases/poco-1.14.2/poco-1.14.2-all.tar.bz2",
      "sha256": "7738a4c880f08e89318fc53915f86be5a0e70f14eb1e7f0e1767c8781c40d794"
     }
    ]
   },
   {
    "name": "libharu",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/libharu/libharu.git",
      "tag": "v2.4.5",
      "commit": "8fe5a738541a04642885fb7a75b2b5b9c5b416fa"
     }
    ]
   },
   {
    "name": "pngpp",
    "buildsystem": "simple",
    "build-commands": [
     "make install PREFIX=/app"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "http://download.savannah.nongnu.org/releases/pngpp/png++-0.2.10.tar.gz",
      "sha512": "c54a74c0c20212bd0dcf86386c0c11dd824ad14952917ba0ff4c184b6547744458728a4f06018371acb7d5b842b641708914ccaa81bad8e72e173903f494ca85"
     }
    ]
   },
   {
    "name": "patchelf",
    "buildsystem": "autotools",
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/NixOS/patchelf.git",
      "tag": "0.18.0",
      "commit": "99c24238981b7b1084313aca8f5c493bb46f302c"
     }
    ]
   },
   {
    "name": "craftos2",
    "buildsystem": "simple",
    "build-commands": [
     "make -C craftos2-lua -j$FLATPAK_BUILDER_N_JOBS linux",
     "./configure --without-ncurses --prefix=/app",
     "make -j$FLATPAK_BUILDER_N_JOBS",
     "install -D -m 755 craftos2-lua/src/liblua.so /app/lib/libcraftos2-lua.so",
     "patchelf --replace-needed craftos2-lua/src/liblua.so libcraftos2-lua.so craftos",
     "install -D -m 755 craftos /app/bin/craftos"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/MCJack123/craftos2.git",
      "tag": "v2.8.3",
      "commit": "33d29b9bcea325ea78893ca2eb781ecb5c8fc0b3",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$",
       "is-main-source": true
      }
     },
     {
      "type": "patch",
      "path": "patches/fix-poco-header-includes.patch"
     }
    ]
   },
   {
    "name": "craftos2-resources",
    "buildsystem": "simple",
    "build-commands": [
     "install -D -m 0644 CraftOS-PC.desktop \"/app/share/applications/CraftOS-PC.desktop\"",
     "desktop-file-edit --set-icon=\"cc.craftos_pc.CraftOS-PC\" --set-key=\"Exec\" --set-value=\"start-craftos %F\" /app/share/applications/CraftOS-PC.desktop",
     "install -D -m 0755 start-craftos /app/bin/start-craftos",
     "install -D -m 0644 256.png \"/app/share/icons/hicolor/256x256/apps/cc.craftos_pc.CraftOS-PC.png\"",
     "install -D -m 0644 appdata.xml /app/share/appdata/CraftOS-PC.appdata.xml",
     "sed -i 's/cc.craftos-pc.CraftOS-PC/cc.craftos_pc.CraftOS-PC/' /app/share/appdata/CraftOS-PC.appdata.xml"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/MCJack123/craftos2/raw/b0c1eab78c58100eb49abeaf0c4f6a9ec336c853/resources/linux-icons.zip",
      "sha256": "bfd61d28c3b61ec634ac66aab2bd5171457a590dcaf0889da7ffcd548ee6208b"
     },
     {
      "type": "file",
      "url": "https://github.com/MCJack123/craftos2/raw/b0c1eab78c58100eb49abeaf0c4f6a9ec336c853/resources/appdata.xml",
      "sha256": "499510b2db3bffd6d389424e6a50b7b9156854525879697404f5efb0d8e74e0d"
     },
     {
      "type": "patch",
      "path": "appstream.patch"
     },
     {
      "type": "file",
      "path": "start-craftos"
     }
    ]
   },
   {
    "name": "craftos2-rom",
    "buildsystem": "simple",
    "build-commands": [
     "install -d -m 755 /app/share/craftos",
     "cp -r ./* /app/share/craftos"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/MCJack123/craftos2-rom.git",
      "tag": "v2.8.3",
      "commit": "a97249651cac27e949951256c1e3120421690aaa",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     }
    ]
   }
  ]
 }
}