{
 "app_id": "org.surge_synth_team.surge-xt",
 "source_url": "https://raw.githubusercontent.com/flathub/org.surge_synth_team.surge-xt/master/org.surge_synth_team.surge-xt.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=pulseaudio",
  "--socket=x11",
  "--filesystem=xdg-run/pipewire-0",
  "--filesystem=xdg-documents/Surge XT:create"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-17T16:16:42.185868+00:00",
 "manifest": {
  "id": "org.surge_synth_team.surge-xt",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "Surge-XT",
  "finish-args": [
   "--socket=x11",
   "--share=ipc",
   "--socket=pulseaudio",
   "--filesystem=xdg-run/pipewire-0",
   "--filesystem=xdg-documents/Surge XT:create",
   "--persist=.config"
  ],
  "build-options": {
   "env": {
    "SURGE_VERSION": "1.3.4",
    "PLUGINS_DIR": "/app/extensions/Plugins/Surge-XT",
    "PLUGINS_ID": "org.freedesktop.LinuxAudio.Plugins.Surge-XT"
   }
  },
  "add-extensions": {
   "org.freedesktop.LinuxAudio.Plugins.Surge-XT": {
    "directory": "extensions/Plugins/Surge-XT",
    "version": "26.08",
    "add-ld-path": "lib",
    "bundle": true,
    "subdirectories": true,
    "no-autodownload": true,
    "autodelete": false
   }
  },
  "cleanup": [
   "/lib/lv2"
  ],
  "modules": [
   "shared-modules/appstream/appstream-compose.json",
   {
    "name": "surge-xt",
    "buildsystem": "cmake-ninja",
    "build-options": {
     "arch": {
      "aarch64": {
       "config-opts": [
        "-DLINUX_ON_ARM=True"
       ]
      }
     },
     "cflags": "-Wno-error=discarded-qualifiers",
     "cxxflags": "-Wno-error=discarded-qualifiers"
    },
    "config-opts": [
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "no-make-install": true,
    "make-args": [
     "surge-xt_Standalone",
     "surge-fx_Standalone"
    ],
    "post-install": [
     "install -Dm755 src/surge-xt/surge-xt_artefacts/RelWithDebInfo/Standalone/Surge\\ XT ${FLATPAK_DEST}/bin/Surge-XT",
     "install -Dm755 src/surge-fx/surge-fx_artefacts/RelWithDebInfo/Standalone/Surge\\ XT\\ Effects ${FLATPAK_DEST}/bin/Surge-XT-Effects",
     "install -d ${FLATPAK_DEST}/share/surge-xt",
     "cp -a resources/data/* ${FLATPAK_DEST}/share/surge-xt",
     "install -Dm644 org.surge_synth_team.surge-xt.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
     "install -Dm644 org.surge_synth_team.surge-xt.effects.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.effects.desktop",
     "install -Dm644 scripts/installer_linux/assets/icons/scalable/apps/surge-xt.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg",
     "install -Dm644 scripts/installer_linux/assets/icons/scalable/apps/surge-xt-fx.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.effects.svg",
     "install -Dm644 -t ${FLATPAK_DEST}/share/metainfo ${FLATPAK_ID}.metainfo.xml",
     "install -Dm644 -t ${FLATPAK_DEST}/share/licenses/surge-xt LICENSE"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/surge-synthesizer/releases-xt/releases/download/1.3.4/surge-src-1.3.4.tar.gz",
      "strip-components": 2,
      "sha256": "d4b8f595a0595205ddd63eacadd23a0be33df46affc83afe9eafff7018990d55"
     },
     {
      "type": "patch",
      "path": "patches/surge-build.patch"
     },
     {
      "type": "patch",
      "path": "patches/surge-sst-build.patch",
      "options": [
       "-d",
       "libs/sst/sst-plugininfra"
      ]
     },
     {
      "type": "file",
      "path": "org.surge_synth_team.surge-xt.desktop"
     },
     {
      "type": "file",
      "path": "org.surge_synth_team.surge-xt.effects.desktop"
     },
     {
      "type": "file",
      "path": "org.surge_synth_team.surge-xt.metainfo.xml"
     }
    ]
   },
   {
    "name": "surge-xt-plugins",
    "buildsystem": "cmake-ninja",
    "build-options": {
     "prefix": "/app/extensions/Plugins/Surge-XT",
     "arch": {
      "aarch64": {
       "config-opts": [
        "-DLINUX_ON_ARM=True"
       ]
      }
     },
     "cflags": "-Wno-error=discarded-qualifiers",
     "cxxflags": "-Wno-error=discarded-qualifiers"
    },
    "config-opts": [
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DSURGE_SKIP_STANDALONE=YES",
     "-DSURGE_BUILD_LV2=YES"
    ],
    "no-make-install": true,
    "make-args": [
     "surge-xt_VST3",
     "surge-fx_VST3",
     "surge-xt_CLAP",
     "surge-fx_CLAP"
    ],
    "post-install": [
     "install -d ${PLUGINS_DIR}/vst3/",
     "cp -R src/surge-fx/surge-fx_artefacts/RelWithDebInfo/VST3/*.vst3 ${PLUGINS_DIR}/vst3/",
     "cp -R src/surge-xt/surge-xt_artefacts/RelWithDebInfo/VST3/*.vst3 ${PLUGINS_DIR}/vst3/",
     "install -d ${PLUGINS_DIR}/clap/",
     "cp -R src/surge-fx/surge-fx_artefacts/RelWithDebInfo/CLAP/*.clap ${PLUGINS_DIR}/clap/",
     "cp -R src/surge-xt/surge-xt_artefacts/RelWithDebInfo/CLAP/*.clap ${PLUGINS_DIR}/clap/",
     "install -d ${PLUGINS_DIR}/share/surge-xt",
     "cp -a resources/data/* ${PLUGINS_DIR}/share/surge-xt",
     "install -Dm644 resources/assets/Logo/SVG/surge_icon.svg ${PLUGINS_DIR}/share/icons/hicolor/scalable/apps/${PLUGINS_ID}.svg",
     "install -Dm644 -t ${PLUGINS_DIR}/share/metainfo ${PLUGINS_ID}.metainfo.xml",
     "appstreamcli compose --components=${PLUGINS_ID} --prefix=/ --origin=${PLUGINS_ID} --result-root=${PLUGINS_DIR} --data-dir=${PLUGINS_DIR}/share/app-info/xmls ${PLUGINS_DIR}",
     "install -Dm644 org.surge_synth_team.surge-xt.desktop ${PLUGINS_DIR}/share/applications/${PLUGINS_ID}.desktop",
     "desktop-file-edit --set-icon=${PLUGINS_ID} ${PLUGINS_DIR}/share/applications/${PLUGINS_ID}.desktop",
     "install -Dm644 -t ${PLUGINS_DIR}/share/licenses/surge-xt LICENSE"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/surge-synthesizer/releases-xt/releases/download/1.3.4/surge-src-1.3.4.tar.gz",
      "strip-components": 2,
      "sha256": "d4b8f595a0595205ddd63eacadd23a0be33df46affc83afe9eafff7018990d55"
     },
     {
      "type": "patch",
      "path": "patches/surge-build.patch"
     },
     {
      "type": "patch",
      "path": "patches/surge-sst-build.patch",
      "options": [
       "-d",
       "libs/sst/sst-plugininfra"
      ]
     },
     {
      "type": "file",
      "path": "org.surge_synth_team.surge-xt.desktop"
     },
     {
      "type": "file",
      "path": "org.freedesktop.LinuxAudio.Plugins.Surge-XT.metainfo.xml"
     }
    ]
   }
  ]
 }
}