{
 "app_id": "io.github.searchandrescue2.sar2",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.searchandrescue2.sar2/master/io.github.searchandrescue2.sar2.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=pulseaudio",
  "--socket=x11",
  "--device=all"
 ],
 "module_count": 5,
 "fetched_at": "2026-09-17T16:12:12.238664+00:00",
 "manifest": {
  "id": "io.github.searchandrescue2.sar2",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "sar2",
  "rename-icon": "sar2",
  "rename-desktop-file": "sar2.desktop",
  "rename-appdata-file": "sar2.appdata.xml",
  "finish-args": [
   "--socket=x11",
   "--share=ipc",
   "--device=all",
   "--socket=pulseaudio",
   "--env=SAR2_DATA=/app/share/sar2"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/share/doc",
   "*.la",
   "*.a"
  ],
  "modules": [
   {
    "name": "scons",
    "cleanup": [
     "*"
    ],
    "buildsystem": "simple",
    "build-commands": [
     "python -mpip install . --no-index --find-links=file://${PWD} --prefix=${FLATPAK_DEST} --no-build-isolation",
     "sed -i '1 s/python/python3/' ${FLATPAK_DEST}/bin/scons"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://sourceforge.net/projects/scons/files/scons/4.5.2/SCons-4.5.2.tar.gz",
      "sha256": "ce26aac95d350a79a4192196b0beac3cb24f4ccabce0123eb28d3370f576f072"
     }
    ]
   },
   "shared-modules/glu/glu-9.json",
   {
    "name": "freealut",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/vancegroup/freealut.git",
      "tag": "freealut_1_1_0",
      "commit": "570dea5b77493cc9ce0b84f6a0a2ee31ed0b2c73"
     }
    ]
   },
   {
    "name": "xmu",
    "sources": [
     {
      "type": "archive",
      "url": "https://www.x.org/archive/individual/lib/libXmu-1.3.1.tar.xz",
      "sha256": "81a99e94c4501e81c427cbaa4a11748b584933e94b7a156830c3621256857bc4",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1785,
       "url-template": "https://www.x.org/archive/individual/lib/libXmu-$version.tar.xz"
      }
     }
    ]
   },
   {
    "name": "sar2",
    "buildsystem": "simple",
    "build-commands": [
     "scons --prefix=${FLATPAK_DEST} --ldflags=-L${FLATPAK_DEST}/lib --optflags=-I${FLATPAK_DEST}/include"
    ],
    "post-install": [
     "mkdir -p ${FLATPAK_DEST}/share/sar2/",
     "cp -ar data/* ${FLATPAK_DEST}/share/sar2/",
     "install -Dm755 bin/sar2 -t ${FLATPAK_DEST}/bin",
     "install -D -m 0644 extra/sar2.desktop -t ${FLATPAK_DEST}/share/applications/",
     "install -D -m 0644 extra/sar2.png -t ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/",
     "install -D -m 0644 extra/sar2.appdata.xml -t ${FLATPAK_DEST}/share/metainfo/"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/SearchAndRescue2/sar2.git",
      "tag": "v2.6.0",
      "commit": "c0bc6c692946f0ce3ab2acdbc03b06112df36b8e",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     },
     {
      "type": "patch",
      "path": "appstream.patch"
     }
    ]
   }
  ]
 }
}