{
    "app-id" : "org.nickvision.tagger",
    "runtime" : "org.gnome.Platform",
    "runtime-version" : "45",
    "sdk" : "org.gnome.Sdk",
    "sdk-extensions": [
        "org.freedesktop.Sdk.Extension.dotnet8"
    ],
    "build-options": {
        "append-path": "/usr/lib/sdk/dotnet8/bin",
        "append-ld-library-path": "/usr/lib/sdk/dotnet8/lib",
        "append-pkg-config-path": "/usr/lib/sdk/dotnet8/lib/pkgconfig"
    },
    "command" : "org.nickvision.tagger",
    "finish-args":[
        "--socket=fallback-x11",
        "--socket=wayland",
        "--device=dri",
        "--share=ipc",
        "--share=network",
        "--filesystem=home"
    ],
    "cleanup":[
        "/include",
        "/lib/pkgconfig",
        "*.a"
    ],
    "add-extensions": {
        "org.freedesktop.Platform.ffmpeg-full": {
            "directory": "lib/ffmpeg",
            "version": "23.08",
            "add-ld-path": ".",
            "autodelete": false
        }
    },
    "cleanup-commands": [
        "mkdir -p /app/lib/ffmpeg"
    ],
    "modules" : [
        {
            "name": "chromaprint",
            "buildsystem": "cmake-ninja",
            "builddir": true,
            "config-opts": [
                "-DCMAKE_BUILD_TYPE:STRING=Release",
                "-DBUILD_TOOLS:BOOL=ON",
                "-DFFT_LIB:STRING=avfft"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/acoustid/chromaprint/releases/download/v1.5.1/chromaprint-1.5.1.tar.gz",
                    "sha256": "a1aad8fa3b8b18b78d3755b3767faff9abb67242e01b478ec9a64e190f335e1c",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 286,
                        "stable-only": true,
                        "url-template": "https://github.com/acoustid/chromaprint/releases/download/v$version/chromaprint-$version.tar.gz"
                    }
                },
                {
                    "type": "patch",
                    "path": "chromaprint_ffmpeg5.patch"
                }
            ],
            "cleanup": [
                "/include",
                "/lib/pkgconfig"
            ]
        },
        {
            "name": "webp-pixbuf-loader",
            "buildsystem": "meson",
            "config-opts": [ "-Dgdk_pixbuf_moduledir=/app/lib/org.nickvision.tagger/gdk-pixbuf-2.0/2.10.0/loaders" ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/aruiz/webp-pixbuf-loader",
                    "commit": "a35014104a226265e44fe30fcdb4df9305af3466"
                }
            ],
            "post-install": [
                "gdk-pixbuf-query-loaders /app/lib/org.nickvision.tagger/gdk-pixbuf-2.0/2.10.0/loaders/*.so > /app/lib/org.nickvision.tagger/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache"
            ]
        },
        {
            "name": "blueprint-compiler",
            "buildsystem": "meson",
            "cleanup": [
                "*"
            ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://gitlab.gnome.org/jwestman/blueprint-compiler",
                    "tag": "v0.10.0"
                }
            ]
        },
        {
            "name": "org.nickvision.tagger",
            "buildsystem": "simple",
            "build-commands": [
                "chmod +x ./flatpak/build.sh",
                "./flatpak/build.sh gnome"
            ],
            "sources": [
                {
                    "type": "dir",
                    "path": ".."
                },
                "../NickvisionTagger.GNOME/nuget-sources.json"
            ]
        }
    ]
}
