{
 "app_id": "io.github.jovi-yashi.zentts",
 "source_url": "https://raw.githubusercontent.com/JoVi-Yashi/zenTTs/main/flatpak/io.github.jovi-yashi.zentts.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--talk-name=org.freedesktop.Notifications",
  "--filesystem=home"
 ],
 "module_count": 5,
 "fetched_at": "2026-09-17T17:37:29.172900+00:00",
 "manifest": {
  "app-id": "io.github.jovi-yashi.zentts",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "zentts-launcher",
  "finish-args": [
   "--share=network",
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--talk-name=org.freedesktop.Notifications",
   "--filesystem=home"
  ],
  "modules": [
   {
    "name": "python-deps",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --no-build-isolation --prefix=/app edge-tts trafilatura"
    ],
    "cleanup": [
     "/lib/python3.*/site-packages/**/*.pyc",
     "/lib/python3.*/site-packages/pip"
    ],
    "modules": [
     {
      "name": "python3-setuptools",
      "buildsystem": "simple",
      "build-commands": [
       "pip3 install --prefix=/app setuptools"
      ],
      "sources": [
       {
        "type": "file",
        "url": "https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-75.8.0.tar.gz",
        "sha256": "507ac18f7c2f06d2489e8d0af6fe62762e4efcdbdab828ef3b0c3622f79e41f6"
       }
      ]
     }
    ]
   },
   {
    "name": "ruby",
    "buildsystem": "autotools",
    "config-opts": [
     "--disable-install-doc",
     "--disable-install-rdoc",
     "--enable-shared",
     "--prefix=/app"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.2.tar.gz",
      "sha256": "eb358569a53a22206f6cab65231b87c6191be6ce2cdaf05a5be10b2e2633b56c"
     }
    ],
    "cleanup": [
     "/app/include",
     "/app/lib/pkgconfig",
     "/app/lib/libruby-static.a"
    ]
   },
   {
    "name": "ruby-gems",
    "buildsystem": "simple",
    "build-commands": [
     "gem install sinatra puma rackup gtk3 --no-document --install-dir /app/lib/ruby/gems/3.4.0",
     "mkdir -p /app/bin",
     "ln -sf /app/lib/ruby/gems/3.4.0/bin/puma /app/bin/puma",
     "ln -sf /app/lib/ruby/gems/3.4.0/bin/rackup /app/bin/rackup"
    ],
    "build-options": {
     "env": {
      "GEM_HOME": "/app/lib/ruby/gems/3.4.0",
      "GEM_PATH": "/app/lib/ruby/gems/3.4.0"
     }
    }
   },
   {
    "name": "zentts",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm755 server.rb /app/share/zentts/server.rb",
     "install -Dm755 gui.rb /app/share/zentts/gui.rb",
     "install -Dm755 launcher.sh /app/share/zentts/launcher.sh",
     "install -Dm644 Gemfile /app/share/zentts/Gemfile",
     "install -Dm644 tts.png /app/share/icons/hicolor/scalable/apps/io.github.jovi-yashi.zentts.png",
     "install -Dm644 tts-zen.desktop /app/share/applications/io.github.jovi-yashi.zentts.desktop",
     "install -Dm644 flatpak/io.github.jovi-yashi.zentts.metainfo.xml /app/share/metainfo/io.github.jovi-yashi.zentts.metainfo.xml",
     "cat > /app/bin/zentts-launcher << 'LAUNCHER'\n#!/bin/sh\nexport GEM_HOME=/app/lib/ruby/gems/3.4.0\nexport GEM_PATH=/app/lib/ruby/gems/3.4.0\nexport PATH=\"/app/bin:/app/share/zentts:$PATH\"\ncd /app/share/zentts\nexec ruby gui.rb\nLAUNCHER\n",
     "chmod +x /app/bin/zentts-launcher",
     "sed -i 's|^Exec=.*|Exec=zentts-launcher|' /app/share/applications/io.github.jovi-yashi.zentts.desktop\nsed -i 's|^Icon=.*|Icon=io.github.jovi-yashi.zentts|' /app/share/applications/io.github.jovi-yashi.zentts.desktop\n"
    ],
    "sources": [
     {
      "type": "dir",
      "path": ".",
      "only": [
       "server.rb",
       "gui.rb",
       "launcher.rb",
       "launcher.sh",
       "Gemfile",
       "tts.png",
       "tts-zen.desktop",
       "flatpak/io.github.jovi-yashi.zentts.metainfo.xml"
      ]
     }
    ]
   }
  ]
 }
}