{
 "app_id": "com.gopeed.Gopeed",
 "source_url": "https://raw.githubusercontent.com/flathub/com.gopeed.Gopeed/master/com.gopeed.Gopeed.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--device=dri",
  "--filesystem=xdg-download",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--own-name=com.gopeed.gopeed"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-17T16:08:01.346107+00:00",
 "manifest": {
  "app-id": "com.gopeed.Gopeed",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.llvm20",
   "org.freedesktop.Sdk.Extension.golang"
  ],
  "command": "gopeed",
  "finish-args": [
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=network",
   "--device=dri",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--filesystem=xdg-download",
   "--own-name=com.gopeed.gopeed"
  ],
  "cleanup": [
   "*.a",
   "*.la",
   "/include",
   "/lib/cmake",
   "/lib/pkgconfig",
   "/man",
   "/share/man",
   "/share/gtk-doc",
   "/var/lib"
  ],
  "modules": [
   "shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json",
   {
    "name": "keybinder3",
    "buildsystem": "autotools",
    "post-install": [
     "install -Dm644 COPYING /app/share/licenses/keybinder-3/COPYING"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/kupferlauncher/keybinder/releases/download/keybinder-3.0-v0.3.2/keybinder-3.0-0.3.2.tar.gz",
      "sha256": "e6e3de4e1f3b201814a956ab8f16dfc8a262db1937ff1eee4d855365398c6020",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/kupferlauncher/keybinder/releases/latest",
       "version-query": ".tag_name | sub(\"^keybinder-3.0-v\"; \"\")",
       "url-query": ".assets[] | select(.name==\"keybinder-3.0-\" + $version + \".tar.gz\") | .browser_download_url"
      }
     }
    ]
   },
   {
    "name": "Gopeed",
    "buildsystem": "simple",
    "build-options": {
     "arch": {
      "x86_64": {
       "env": {
        "BUNDLE_PATH": "ui/flutter/build/linux/x64/release/bundle"
       }
      },
      "aarch64": {
       "env": {
        "BUNDLE_PATH": "ui/flutter/build/linux/arm64/release/bundle"
       }
      }
     },
     "append-path": "/usr/lib/sdk/llvm20/bin:/usr/lib/sdk/golang/bin:/var/lib/flutter/bin",
     "prepend-ld-library-path": "/usr/lib/sdk/llvm20/lib",
     "env": {
      "PUB_CACHE": "/run/build/Gopeed/.pub-cache"
     }
    },
    "build-commands": [
     "go build -mod=vendor -tags nosqlite -ldflags=\"-w -s -X github.com/GopeedLab/gopeed/pkg/base.Version=$(grep '^version:' ui/flutter/pubspec.yaml | cut -d ' ' -f 2 | cut -d '+' -f 1)\" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/GopeedLab/gopeed/bind/desktop",
     "go build -mod=vendor -ldflags=\"-w -s\" -o ui/flutter/assets/exec/host github.com/GopeedLab/gopeed/cmd/host",
     "go build -mod=vendor -ldflags=\"-w -s\" -o ui/flutter/assets/exec/updater github.com/GopeedLab/gopeed/cmd/updater",
     "setup-flutter.sh -C ui/flutter",
     "cd ui/flutter && flutter build linux --release --no-pub --verbose",
     "cp -r ${BUNDLE_PATH}/* ${FLATPAK_DEST}/bin",
     "install -Dm644 com.gopeed.Gopeed.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo",
     "install -Dm644 ui/flutter/linux/assets/com.gopeed.Gopeed.desktop -t ${FLATPAK_DEST}/share/applications",
     "install -Dm644 ui/flutter/assets/icon/icon.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/GopeedLab/gopeed.git",
      "tag": "v1.9.3",
      "commit": "a5cd53f94c18ac65add684b1113fa5f0b47cc4da",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$",
       "is-main-source": true
      }
     },
     {
      "type": "file",
      "path": "com.gopeed.Gopeed.metainfo.xml"
     },
     "go.mod.yml",
     "generated/sources/pubspec.json"
    ],
    "modules": [
     "generated/modules/flutter-sdk-3.41.9.json"
    ]
   }
  ]
 }
}