{
 "app_id": "io.github.perfect_dark_pc_port.perfect_dark",
 "source_url": "https://raw.githubusercontent.com/fpiesche/flatpak-builds/main/apps/io.github.perfect_dark_pc_port.perfect_dark/io.github.perfect_dark_pc_port.perfect_dark.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--device=all",
  "--share=ipc",
  "--socket=x11",
  "--socket=pulseaudio",
  "--share=network"
 ],
 "module_count": 7,
 "fetched_at": "2026-09-20T12:56:54.085881+00:00",
 "manifest": {
  "app-id": "io.github.perfect_dark_pc_port.perfect_dark",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "io.github.perfect_dark_pc_port.perfect_dark.sh",
  "finish-args": [
   "--device=all",
   "--share=ipc",
   "--socket=x11",
   "--socket=pulseaudio",
   "--share=network"
  ],
  "build-options": {
   "strip": true,
   "no-debuginfo": true
  },
  "modules": [
   {
    "name": "perfect_dark_ntsc",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DROMID=ntsc-final"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/perfect-dark-pc-port/perfect_dark.git",
      "commit": "32a1cb9f268dd3ac73016801025c6bbbfa20130f",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/perfect-dark-pc-port/perfect_dark/branches/port",
       "commit-query": ".commit.sha"
      }
     }
    ],
    "post-install": [
     "install -Dm 755 ./pd.$(uname -m | sed 's/^aarch64$/arm64/') /app/bin/pd.ntsc"
    ]
   },
   {
    "name": "perfect_dark_pal",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DROMID=pal-final"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/perfect-dark-pc-port/perfect_dark.git",
      "commit": "32a1cb9f268dd3ac73016801025c6bbbfa20130f",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/perfect-dark-pc-port/perfect_dark/branches/port",
       "commit-query": ".commit.sha"
      }
     }
    ],
    "post-install": [
     "install -Dm 755 ./pd.pal.$(uname -m | sed 's/^aarch64$/arm64/') /app/bin/pd.pal"
    ]
   },
   {
    "name": "perfect_dark_jpn",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DROMID=jpn-final"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/perfect-dark-pc-port/perfect_dark.git",
      "commit": "32a1cb9f268dd3ac73016801025c6bbbfa20130f",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/perfect-dark-pc-port/perfect_dark/branches/port",
       "commit-query": ".commit.sha"
      }
     }
    ],
    "post-install": [
     "install -Dm 755 ./pd.jpn.$(uname -m | sed 's/^aarch64$/arm64/') /app/bin/pd.jpn"
    ]
   },
   {
    "name": "perfect_dark_netplay_ntsc",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DROMID=ntsc-final"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/perfect-dark-pc-port/perfect_dark.git",
      "commit": "be0293f555fd0b008f38807d0f5821161bf2ecbb",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/perfect-dark-pc-port/perfect_dark/branches/port-net",
       "commit-query": ".commit.sha"
      }
     },
     {
      "type": "patch",
      "path": "fix-netplay-build.patch"
     }
    ],
    "build-commands": [
     "install -Dm 755 ./pd.$(uname -m | sed 's/^aarch64$/arm64/') /app/bin/pd-netplay.ntsc"
    ]
   },
   {
    "name": "perfect_dark_netplay_pal",
    "buildsystem": "cmake-ninja",
    "no-make-install": true,
    "config-opts": [
     "-DROMID=pal-final"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/perfect-dark-pc-port/perfect_dark.git",
      "commit": "be0293f555fd0b008f38807d0f5821161bf2ecbb",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/perfect-dark-pc-port/perfect_dark/branches/port-net",
       "commit-query": ".commit.sha"
      }
     },
     {
      "type": "patch",
      "path": "fix-netplay-build.patch"
     }
    ],
    "build-commands": [
     "install -Dm 755 ./pd.pal.$(uname -m | sed 's/^aarch64$/arm64/') /app/bin/pd-netplay.pal"
    ]
   },
   {
    "name": "perfect_dark_netplay_jpn",
    "no-make-install": true,
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DROMID=jpn-final"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/perfect-dark-pc-port/perfect_dark.git",
      "commit": "be0293f555fd0b008f38807d0f5821161bf2ecbb",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/perfect-dark-pc-port/perfect_dark/branches/port-net",
       "commit-query": ".commit.sha"
      }
     },
     {
      "type": "patch",
      "path": "fix-netplay-build.patch"
     }
    ],
    "build-commands": [
     "install -Dm 755 ./pd.jpn.$(uname -m | sed 's/^aarch64$/arm64/') /app/bin/pd-netplay.jpn"
    ]
   },
   {
    "name": "freedesktop",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/perfect-dark-pc-port/perfect_dark.git",
      "commit": "32a1cb9f268dd3ac73016801025c6bbbfa20130f",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/perfect-dark-pc-port/perfect_dark/branches/port",
       "commit-query": ".commit.sha"
      }
     },
     {
      "type": "file",
      "path": "io.github.perfect_dark_pc_port.perfect_dark.metainfo.xml"
     }
    ],
    "build-commands": [
     "install -Dm 644 ${FLATPAK_BUILDER_BUILDDIR}/${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml",
     "sed -i \"s/.x86_64//\" dist/linux/${FLATPAK_ID}.sh && sed -i \"s/pd\\\"/pd.ntsc\\\"/\" dist/linux/${FLATPAK_ID}.sh",
     "install -Dm 755 dist/linux/${FLATPAK_ID}.sh -t /app/bin/",
     "install -Dm 644 dist/linux/${FLATPAK_ID}.desktop -t /app/share/applications/",
     "install -Dm 644 dist/linux/${FLATPAK_ID}.png -t /app/share/icons/hicolor/256x256/apps/",
     "install -Dm 755 dist/linux/${FLATPAK_ID}.sh /app/bin/${FLATPAK_ID}.netplay.sh",
     "sed -i \"s:\\\"pd:\\\"/app/bin/netplay/pd:\" /app/bin/${FLATPAK_ID}.netplay.sh",
     "desktop-file-edit dist/linux/${FLATPAK_ID}.desktop --set-key=\"Exec\" --set-value=\"/app/bin/${FLATPAK_ID}.netplay.sh\"",
     "desktop-file-edit dist/linux/${FLATPAK_ID}.desktop --set-name=\"Perfect Dark Netplay\"",
     "install -Dm 644 dist/linux/${FLATPAK_ID}.desktop /app/share/applications/${FLATPAK_ID}.netplay.desktop"
    ]
   }
  ]
 }
}