{
    "app-id": "fr.handbrake.ghb",
    "runtime": "org.gnome.Platform",
    "runtime-version": "3.34",
    "sdk": "org.gnome.Sdk",
    "command": "ghb",
    "finish-args": [
        "--device=dri",
        "--share=ipc",
        "--socket=x11",
        "--socket=wayland",
        "--filesystem=host",
        "--filesystem=xdg-run/dconf",
        "--filesystem=xdg-run/gvfs",
        "--filesystem=~/.config/dconf:ro",
        "--talk-name=ca.desrt.dconf",
        "--talk-name=org.gtk.vfs.*",
        "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
        "--env=PATH=/app/bin:/usr/bin:/app/extensions/bin",
        "--env=JAVA_HOME=/app/extensions/jre",
        "--env=GIO_EXTRA_MODULES=/app/lib/gio/modules"
    ],
    "add-extensions": {
        "fr.handbrake.plugin": {
            "version": "1",
            "directory": "extensions",
            "add-ld-path": "lib",
            "merge-dirs": "lib;bin;share;jre",
            "subdirectories": true,
            "no-autodownload": true,
            "autodelete": true
        }
    },
    "modules": [
        {
            "name": "numactl",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/numactl/numactl/releases/download/v2.0.12/numactl-2.0.12.tar.gz",
                    "sha256": "55bbda363f5b32abd057b6fbb4551dd71323f5dbb66335ba758ba93de2ada729"
                }
            ]
        },
        {
            "name": "libass",
            "config-opts": ["--enable-asm", "--enable-harfbuzz",
                            "--enable-fontconfig"],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/libass/libass/releases/download/0.14.0/libass-0.14.0.tar.gz",
                    "sha256": "8d5a5c920b90b70a108007ffcd2289ac652c0e03fc88e6eecefa37df0f2e7fdf"
                }
            ]
        },
        {
            "name": "handbrake",
            "no-autogen": true,
            "config-opts": [
                "--flatpak",
                "--disable-gtk-update-checks"
            ],
            "builddir": true,
            "post-install": ["install -d /app/extensions"],
            "sources": [
                {
                    "type": "archive",
                    "path": "handbrake.tar.bz2",
                    "strip-components": 1
                },
                {
                    "type": "archive",
                    "path": "download.tgz",
                    "strip-components": 0
                }
            ],
            "modules": [
            ]
        }
    ]
}

