{
 "app_id": "io.github.saeugetier.photobooth",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.saeugetier.photobooth/master/io.github.saeugetier.photobooth.json",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.9",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--device=all",
  "--filesystem=home",
  "--filesystem=/media",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--filesystem=/run/media",
  "--filesystem=/run/udev:ro",
  "--filesystem=/mnt",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings",
  "--talk-name=org.kde.kdeconnect"
 ],
 "module_count": 16,
 "fetched_at": "2026-09-17T16:12:06.897690+00:00",
 "manifest": {
  "app-id": "io.github.saeugetier.photobooth",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.9",
  "sdk": "org.kde.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.golang"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/golang/bin",
   "env": {
    "GOPATH": "/app/go",
    "GOBIN": "/app/go/bin"
   },
   "strip": true
  },
  "command": "qtbooth",
  "finish-args": [
   "--share=ipc",
   "--share=network",
   "--device=all",
   "--filesystem=home",
   "--filesystem=/media",
   "--filesystem=/run/media",
   "--filesystem=/mnt",
   "--filesystem=/run/udev:ro",
   "--socket=fallback-x11",
   "--socket=wayland"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/lib/cmake",
   "/share/doc",
   "/share/gtk-doc",
   "/share/man",
   "/share/pkgconfig",
   "*.la",
   "*.a"
  ],
  "modules": [
   {
    "name": "opencv4",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DBUILD_TESTS=OFF",
     "-DBUILD_PERF_TESTS=OFF",
     "-DBUILD_DOCS=OFF",
     "-DBUILD_LIST=imgproc,imgcodecs",
     "-DOPENCV_GENERATE_PKGCONFIG=ON",
     "-DOPENCV_LIB_INSTALL_PATH=/app/lib"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/opencv/opencv/archive/4.5.5.tar.gz",
      "sha256": "a1cfdcf6619387ca9e232687504da996aaa9f7b5689986b8331ec02cb61d28ad"
     }
    ],
    "cleanup": [
     "/bin/*",
     "/share/*"
    ]
   },
   {
    "name": "libcamera",
    "buildsystem": "meson",
    "builddir": true,
    "config-opts": [
     "-Dpipelines=rpi/vc4,rpi/pisp,uvcvideo",
     "-Dipas=rpi/vc4,rpi/pisp",
     "-Dgstreamer=enabled",
     "-Dtest=false",
     "-Dcam=disabled",
     "-Dqcam=disabled",
     "-Ddocumentation=disabled",
     "-Dpycamera=disabled"
    ],
    "cleanup": [
     "/share/doc",
     "*.la"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/raspberrypi/libcamera.git",
      "tag": "v0.6.0+rpt20251202"
     },
     {
      "type": "patch",
      "path": "patches/flatpak-patch.patch"
     }
    ],
    "modules": [
     {
      "name": "python3-jinja2",
      "buildsystem": "simple",
      "build-commands": [
       "pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} flit-core --no-build-isolation",
       "pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"Jinja2\" --no-build-isolation"
      ],
      "sources": [
       {
        "type": "file",
        "url": "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz",
        "sha256": "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2",
        "x-checker-data": {
         "type": "pypi",
         "name": "flit-core"
        }
       },
       {
        "type": "file",
        "url": "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz",
        "sha256": "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698",
        "x-checker-data": {
         "type": "pypi",
         "name": "MarkupSafe"
        }
       },
       {
        "type": "file",
        "url": "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz",
        "sha256": "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d",
        "x-checker-data": {
         "type": "pypi",
         "name": "Jinja2"
        }
       }
      ],
      "cleanup": [
       "*"
      ]
     },
     {
      "name": "python3-PyYAML",
      "buildsystem": "simple",
      "build-commands": [
       "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"PyYAML\" --no-build-isolation"
      ],
      "sources": [
       {
        "type": "file",
        "url": "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz",
        "sha256": "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"
       }
      ],
      "cleanup": [
       "*"
      ]
     },
     {
      "name": "python3-ply",
      "buildsystem": "simple",
      "build-commands": [
       "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"ply\" --no-build-isolation"
      ],
      "sources": [
       {
        "type": "file",
        "url": "https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl",
        "sha256": "096f9b8350b65ebd2fd1346b12452efe5b9607f7482813ffca50c22722a807ce"
       }
      ],
      "cleanup": [
       "*"
      ]
     },
     {
      "name": "nlohmann_json",
      "buildsystem": "cmake-ninja",
      "config-opts": [
       "-DJSON_MultipleHeaders=OFF",
       "-DJSON_BuildTests=OFF"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz",
        "sha256": "d6c65aca6b1ed68e7a182f4757257b107ae403032760ed6ef121c9d55e81757d"
       }
      ]
     },
     {
      "name": "libpisp",
      "buildsystem": "meson",
      "builddir": true,
      "config-opts": [
       "--buildtype=release"
      ],
      "sources": [
       {
        "type": "git",
        "url": "https://github.com/raspberrypi/libpisp.git",
        "tag": "v1.3.0"
       }
      ]
     }
    ]
   },
   {
    "name": "onnxruntime",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p ${FLATPAK_DEST}/include ${FLATPAK_DEST}/lib",
     "cp -r include/* ${FLATPAK_DEST}/include",
     "cp -r lib/* ${FLATPAK_DEST}/lib"
    ],
    "sources": [
     {
      "type": "archive",
      "only-arches": [
       "x86_64"
      ],
      "url": "https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-1.21.0.tgz",
      "sha256": "7485c7e7aac6501b27e353dcbe068e45c61ab51fbaf598d13970dfae669d20bf"
     },
     {
      "type": "archive",
      "only-arches": [
       "aarch64"
      ],
      "url": "https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-aarch64-1.21.0.tgz",
      "sha256": "4508084bde1232ee1ab4b6fad2155be0ea2ccab1c1aae9910ddb3fb68a60805e"
     }
    ]
   },
   {
    "name": "ncnn",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DNCNN_BUILD_TESTS=OFF",
     "-DNCNN_BUILD_EXAMPLES=OFF",
     "-DNCNN_BUILD_TOOLS=OFF",
     "-DNCNN_BUILD_BENCHMARK=OFF",
     "-DNCNN_SHARED_LIB=ON"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/Tencent/ncnn/archive/refs/tags/20250503.tar.gz",
      "sha256": "3afea4cf092ce97d06305b72c6affbcfb3530f536ae8e81a4f22007d82b729e9"
     }
    ]
   },
   {
    "name": "qtvirtualkeyboard",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "archive",
      "url": "https://download.qt.io/official_releases/qt/6.9/6.9.3/submodules/qtvirtualkeyboard-everywhere-src-6.9.3.tar.xz",
      "sha256": "a1a0d5c91c9e7fe608867718c152272feae8560d920effa59c2c84b6dd415534"
     }
    ],
    "post-install": [
     "rm -rd ${FLATPAK_DEST}/lib/${FLATPAK_ARCH}-linux-gnu/cmake",
     "rm -rd ${FLATPAK_DEST}/lib/${FLATPAK_ARCH}-linux-gnu/pkgconfig",
     "mv ${FLATPAK_DEST}/lib/${FLATPAK_ARCH}-linux-gnu/* /app/lib/",
     "rmdir ${FLATPAK_DEST}/lib/${FLATPAK_ARCH}-linux-gnu"
    ]
   },
   {
    "name": "go-selphy-cp",
    "buildsystem": "simple",
    "build-commands": [
     "make selphy",
     "cp selphy ${FLATPAK_DEST}/bin"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/saeugetier/go-selphy-cp.git",
      "commit": "c6272691c3b02cded7df9642941dc64ea515e651"
     }
    ]
   },
   {
    "name": "yolo-models",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p ${FLATPAK_DEST}/share/models",
     "install -Dm644 *.onnx ${FLATPAK_DEST}/share/models/",
     "install -Dm644 coco.names ${FLATPAK_DEST}/share/models/",
     "for d in *_model; do cp -r \"$d\" ${FLATPAK_DEST}/share/models/; done",
     "for d in *_model_320; do cp -r \"$d\" ${FLATPAK_DEST}/share/models/; done"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/saeugetier/photobooth-model-zoo/releases/download/v0.2.0/yolo-models-v0.2.0.tar.gz",
      "sha256": "b76a6927f40c889d0e24a8e063f9c74125bf7349764957951fc8ae94a3e12f87"
     }
    ]
   },
   {
    "name": "libgphoto2",
    "builddir": true,
    "cleanup": [
     "/doc",
     "*.la"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/gphoto/libgphoto2.git",
      "tag": "v2.5.32",
      "commit": "de1f0617b1ffa39c1980d1306343709c7dc0120e",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 12558,
       "stable-only": true
      }
     },
     {
      "type": "script",
      "dest-filename": "autogen.sh",
      "commands": [
       "AUTOMAKE=\"automake --foreign\" autoreconf -vfis"
      ]
     }
    ],
    "modules": [
     "shared-modules/libusb/libusb.json"
    ]
   },
   {
    "name": "libgpiod",
    "buildsystem": "autotools",
    "config-opts": [
     "--enable-tools=no",
     "--enable-bindings-cxx=no",
     "--enable-bindings-python=no"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git",
      "tag": "v2.2.1"
     }
    ]
   },
   {
    "name": "qtbooth",
    "buildsystem": "qmake",
    "post-install": [
     "install -Dm644 io.github.saeugetier.photobooth.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo",
     "install -Dm644 io.github.saeugetier.photobooth.desktop -t ${FLATPAK_DEST}/share/applications",
     "install -Dm644 io.github.saeugetier.photobooth.svg -t ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/saeugetier/photobooth",
      "commit": "2e89e94b770b51fb291d994e56e5ac671d948763",
      "tag": "v0.9.0"
     }
    ]
   }
  ]
 }
}