{
 "app_id": "io.github.hebbihebb.Sharpr",
 "source_url": "https://raw.githubusercontent.com/hebbihebb/Sharpr/main/sharpr/packaging/io.github.hebbihebb.Sharpr.yml",
 "runtime": "org.gnome.Platform",
 "runtime_version": "50",
 "sdk": "org.gnome.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=xdg-pictures",
  "--filesystem=home:ro",
  "--talk-name=org.freedesktop.portal.FileChooser",
  "--talk-name=org.freedesktop.FileManager1"
 ],
 "module_count": 5,
 "fetched_at": "2026-09-17T17:47:43.530750+00:00",
 "manifest": {
  "app-id": "io.github.hebbihebb.Sharpr",
  "runtime": "org.gnome.Platform",
  "runtime-version": "50",
  "sdk": "org.gnome.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.rust-stable"
  ],
  "command": "sharpr",
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--device=dri",
   "--filesystem=xdg-pictures",
   "--filesystem=home:ro",
   "--talk-name=org.freedesktop.portal.FileChooser",
   "--talk-name=org.freedesktop.FileManager1"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/rust-stable/bin",
   "env": {
    "CARGO_HOME": "/run/build/sharpr/cargo"
   },
   "num-processes": 4
  },
  "modules": [
   {
    "name": "exiv2",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DEXIV2_BUILD_SAMPLES=OFF",
     "-DEXIV2_BUILD_UNIT_TESTS=OFF",
     "-DEXIV2_ENABLE_INIH=OFF"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/Exiv2/exiv2/archive/refs/tags/v0.28.3.tar.gz",
      "sha256": "1315e17d454bf4da3cc0edb857b1d2c143670f3485b537d0f946d9ed31d87b70"
     }
    ]
   },
   {
    "name": "gexiv2",
    "buildsystem": "meson",
    "config-opts": [
     "-Dintrospection=false",
     "-Dvapi=false",
     "-Dpython3=false"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://download.gnome.org/sources/gexiv2/0.14/gexiv2-0.14.3.tar.xz",
      "sha256": "21e64d2c56e9b333d44fef3f2a4b25653d922c419acd972fa96fab695217e2c8"
     }
    ]
   },
   {
    "name": "realesrgan-ncnn-vulkan",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm755 realesrgan-ncnn-vulkan /app/bin/realesrgan-ncnn-vulkan",
     "mkdir -p /app/bin/models/",
     "find . -maxdepth 1 \\( -name '*.bin' -o -name '*.param' \\) -exec cp -t /app/bin/models/ {} +"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesrgan-ncnn-vulkan-20220424-ubuntu.zip",
      "sha256": "e5aa6eb131234b87c0c51f82b89390f5e3e642b7b70f2b9bbe95b6a285a40c96"
     }
    ]
   },
   {
    "name": "onnxruntime",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm755 lib/libonnxruntime.so.1.24.2 /app/lib/libonnxruntime.so.1.24.2",
     "ln -sf libonnxruntime.so.1.24.2 /app/lib/libonnxruntime.so.1",
     "ln -sf libonnxruntime.so.1.24.2 /app/lib/libonnxruntime.so",
     "install -Dm755 lib/libonnxruntime_providers_shared.so /app/lib/libonnxruntime_providers_shared.so"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/microsoft/onnxruntime/releases/download/v1.24.2/onnxruntime-linux-x64-1.24.2.tgz",
      "sha256": "43725474ba5663642e17684717946693850e2005efbd724ac72da278fead25e6"
     }
    ]
   },
   {
    "name": "sharpr",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "ORT_LIB_LOCATION": "/app/lib",
      "ORT_PREFER_DYNAMIC_LINK": "1"
     }
    },
    "sources": [
     {
      "type": "dir",
      "path": ".flatpak-source"
     },
     "cargo-sources.json"
    ],
    "build-commands": [
     "mkdir -p .cargo",
     "cat > .cargo/config.toml <<'EOF'\n[source.crates-io]\nreplace-with = \"vendored-sources\"\n\n[source.vendored-sources]\ndirectory = \"cargo/vendor\"\nEOF\n",
     "cargo --offline build --release --jobs 4",
     "install -Dm755 target/release/sharpr /app/bin/sharpr",
     "install -Dm644 data/io.github.hebbihebb.Sharpr.desktop /app/share/applications/io.github.hebbihebb.Sharpr.desktop",
     "install -Dm644 data/io.github.hebbihebb.Sharpr.metainfo.xml /app/share/metainfo/io.github.hebbihebb.Sharpr.metainfo.xml",
     "install -Dm644 data/io.github.hebbihebb.Sharpr.png /app/share/icons/hicolor/512x512/apps/io.github.hebbihebb.Sharpr.png",
     "install -Dm644 data/io.github.hebbihebb.Sharpr.gschema.xml /app/share/glib-2.0/schemas/io.github.hebbihebb.Sharpr.gschema.xml",
     "glib-compile-schemas /app/share/glib-2.0/schemas/"
    ]
   }
  ]
 }
}