{
 "app_id": "org.openomf.OpenOMF",
 "source_url": "https://raw.githubusercontent.com/flathub/org.openomf.OpenOMF/master/org.openomf.OpenOMF.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "23.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=all"
 ],
 "module_count": 8,
 "fetched_at": "2026-09-17T16:16:16.067821+00:00",
 "manifest": {
  "app-id": "org.openomf.OpenOMF",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "23.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "openomf",
  "finish-args": [
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--share=network",
   "--device=all",
   "--socket=pulseaudio"
  ],
  "cleanup": [
   "/include",
   "/share/doc",
   "*.a",
   "*.la"
  ],
  "modules": [
   {
    "name": "libxmp",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/libxmp/libxmp",
      "tag": "libxmp-4.6.1"
     }
    ],
    "config-opts": [
     "-DBUILD_STATIC=OFF",
     "-DBUILD_SHARED=ON"
    ]
   },
   {
    "name": "enet",
    "buildsystem": "autotools",
    "sources": [
     {
      "type": "archive",
      "url": "http://enet.bespin.org/download/enet-1.3.18.tar.gz",
      "sha256": "2a8a0c5360d68bb4fcd11f2e4c47c69976e8d2c85b109dd7d60b1181a4f85d36"
     }
    ]
   },
   {
    "name": "confuse",
    "buildsystem": "autotools",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/libconfuse/libconfuse",
      "tag": "v3.3"
     }
    ]
   },
   {
    "name": "miniupnpc",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/transmission/miniupnpc",
      "tag": "miniupnpc_2_3_0"
     }
    ],
    "config-opts": [
     "-DUPNPC_BUILD_STATIC=FALSE",
     "-DUPNPC_BUILD_SHARED=TRUE",
     "-DUPNPC_BUILD_SAMPLE=FALSE"
    ],
    "cleanup": [
     "/bin"
    ]
   },
   {
    "name": "libnatpmp",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/miniupnp/libnatpmp",
      "commit": "8257134a5dcb077e40db1946554d676e444406e4"
     }
    ],
    "config-opts": [
     "-DBUILD_SHARED_LIBS=ON"
    ],
    "post-install": [
     "install -Dm644 natpmp_declspec.h ${FLATPAK_DEST}/include"
    ]
   },
   {
    "name": "omf2097-data",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "archive",
      "url": "https://www.omf2097.com/pub/files/omf/openomf-assets.zip",
      "sha256": "de472c786adf9e618bf4b71a5f2cb85bb0b090f27da2b3008f305453a8dea67d"
     }
    ],
    "build-commands": [
     "install -Dm644 -t ${FLATPAK_DEST}/share/games/openomf/ *.BK",
     "install -Dm644 -t ${FLATPAK_DEST}/share/games/openomf/ *.TRN",
     "install -Dm644 -t ${FLATPAK_DEST}/share/games/openomf/ *.AF",
     "install -Dm644 -t ${FLATPAK_DEST}/share/games/openomf/ *.PIC",
     "install -Dm644 -t ${FLATPAK_DEST}/share/games/openomf/ *.PSM",
     "install -Dm644 -t ${FLATPAK_DEST}/share/games/openomf/ *.DAT",
     "install -Dm644 -t ${FLATPAK_DEST}/share/games/openomf/ *.PCX"
    ]
   },
   {
    "name": "openomf-icons",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "archive",
      "url": "https://www.omf2097.com/pub/files/omf/openomf-icons.zip",
      "sha256": "f0b5a6ae46376625dcb957b4663f744501544f0336edd2787aff538811a8564d"
     }
    ],
    "build-commands": [
     "install -Dm644 omf-48x48.png ${FLATPAK_DEST}/share/icons/hicolor/48x48/apps/org.openomf.OpenOMF.png",
     "install -Dm644 omf-64x64.png ${FLATPAK_DEST}/share/icons/hicolor/64x64/apps/org.openomf.OpenOMF.png",
     "install -Dm644 omf-128x128.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/org.openomf.OpenOMF.png",
     "install -Dm644 omf-256x256.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/org.openomf.OpenOMF.png"
    ]
   },
   {
    "name": "openomf",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/omf2097/OpenOMF.git",
      "tag": "0.8.5",
      "disable-shallow-clone": true
     }
    ],
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DUSE_MINIUPNPC=YES",
     "-DUSE_NATPMP=YES"
    ],
    "post-install": [
     "install -Dm644 resources/flatpak/org.openomf.OpenOMF.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo",
     "sed -i 's/https:\\/\\/openomf/https:\\/\\/www.openomf/g' ${FLATPAK_DEST}/share/metainfo/org.openomf.OpenOMF.metainfo.xml",
     "install -Dm644 resources/flatpak/org.openomf.OpenOMF.desktop -t ${FLATPAK_DEST}/share/applications"
    ]
   }
  ]
 }
}