{
 "app_id": "io.github.DavidNi05.Microsoft365_for_Linux_Unofficial",
 "source_url": "https://raw.githubusercontent.com/DavidNi05/Microsoft365_for_Linux_Unofficial/main/io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.json",
 "runtime": "org.gnome.Platform",
 "runtime_version": "50",
 "sdk": "org.gnome.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--device=dri",
  "--socket=pulseaudio",
  "--talk-name=org.freedesktop.Notifications",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=org.freedesktop.Flatpak",
  "--filesystem=home"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-17T18:01:56.862411+00:00",
 "manifest": {
  "app-id": "io.github.DavidNi05.Microsoft365_for_Linux_Unofficial",
  "runtime": "org.gnome.Platform",
  "runtime-version": "50",
  "sdk": "org.gnome.Sdk",
  "command": "m365-linux",
  "finish-args": [
   "--share=network",
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--device=dri",
   "--socket=pulseaudio",
   "--talk-name=org.freedesktop.Notifications",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--talk-name=org.freedesktop.Flatpak",
   "--filesystem=home"
  ],
  "cleanup": [
   "/ldc",
   "/share/icons/hicolor/scalable/places/onedrive.svg",
   "/share/icons/hicolor/scalable/apps/onedrive-notifications.svg"
  ],
  "modules": [
   {
    "name": "libxml2",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/GNOME/libxml2.git",
      "tag": "v2.12.9"
     }
    ],
    "config-opts": [
     "-DCMAKE_INSTALL_LIBDIR=/app/lib",
     "-DLIBXML2_WITH_PYTHON=OFF",
     "-DLIBXML2_WITH_PROGRAMS=OFF",
     "-DLIBXML2_WITH_TESTS=OFF"
    ]
   },
   {
    "name": "ldc",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/ldc-developers/ldc/releases/download/v1.36.0/ldc2-1.36.0-linux-x86_64.tar.xz",
      "sha256": "2d418462d1c3909f5889298d97de061d023850a371ea9d418fc3fd2d4b7e8b19"
     }
    ],
    "build-commands": [
     "mkdir -p /app/ldc",
     "cp -a . /app/ldc/",
     "cp -a /app/lib/libxml2* /app/ldc/lib/ 2>/dev/null || true"
    ]
   },
   {
    "name": "onedrive",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/abraunegg/onedrive.git",
      "commit": "0b7299adb170d789d27d517963bc65fb04e0bd63"
     }
    ],
    "build-options": {
     "env": {
      "DC": "ldc2"
     },
     "append-path": "/app/ldc/bin",
     "append-ld-library-path": "/app/lib:/app/lib64:/app/ldc/lib"
    },
    "build-commands": [
     "./configure --prefix=/app",
     "make -j${FLATPAK_BUILDER_N_JOBS}",
     "make install"
    ]
   },
   {
    "name": "microsoft365-for-linux",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "dir",
      "path": "."
     }
    ],
    "build-commands": [
     "mkdir -p /app/share/microsoft365",
     "mkdir -p /app/share/microsoft365/assets",
     "mkdir -p /app/bin",
     "cp -r src /app/share/microsoft365/",
     "cp m365-linux /app/bin/m365-linux",
     "chmod +x /app/bin/m365-linux",
     "install -Dm644 desktop/io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.desktop /app/share/applications/io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.desktop",
     "install -Dm644 io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.metainfo.xml /app/share/metainfo/io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.metainfo.xml",
     "install -Dm644 icons/hicolor/512x512/apps/io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.png /app/share/icons/hicolor/512x512/apps/io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.png",
     "install -Dm644 icons/hicolor/512x512/apps/io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.png /app/share/icons/hicolor/128x128/apps/io.github.DavidNi05.Microsoft365_for_Linux_Unofficial.png",
     "install -Dm644 assets/m365-tray.png /app/share/microsoft365/assets/m365-tray.png",
     "install -Dm644 assets/onedrive-folder.png /app/share/microsoft365/assets/onedrive-folder.png"
    ]
   }
  ]
 }
}