{
    "app-id": "org.kde.kid3",
    "branch": "master",
    "runtime": "org.kde.Platform",
    "runtime-version": "5.15-23.08",
    "sdk": "org.kde.Sdk",
    "command": "kid3",
    "rename-icon": "kid3",
    "tags": ["nightly"],
    "desktop-file-name-suffix": " (Nightly)",

    "finish-args": [
        "--socket=wayland",
        "--socket=fallback-x11",
        "--socket=pulseaudio",
        "--share=ipc",
        "--device=dri",
        "--share=network",
        "--filesystem=xdg-download",
        "--filesystem=xdg-music",
        "--env=TMPDIR=/var/tmp",
        "--own-name=org.mpris.MediaPlayer2.kid3"
    ],

    "cleanup": [
        "/man",
        "/share/man",
        "/include",
        "/lib/*.a",
        "/lib/*.la",
        "/share/**/*-qt.*",
        "/share/icons/**/**/**/*-qt.*"
    ],

    "modules": [
        {
            "name": "chromaprint",
            "buildsystem": "cmake-ninja",
            "config-opts": [
                "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/acoustid/chromaprint/archive/v1.5.1.tar.gz",
                    "sha256": "a1aad8fa3b8b18b78d3755b3767faff9abb67242e01b478ec9a64e190f335e1c",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 286,
                        "stable-only": true,
                        "url-template": "https://github.com/acoustid/chromaprint/archive/v$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "taglib",
            "buildsystem": "cmake-ninja",
            "config-opts": [
                "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
                "-DBUILD_SHARED_LIBS=ON"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://taglib.github.io/releases/taglib-1.13.1.tar.gz",
                    "sha256": "c8da2b10f1bfec2cd7dbfcd33f4a2338db0765d851a50583d410bacf055cfd0b",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 1982,
                        "stable-only": true,
                        "url-template": "https://taglib.github.io/releases/taglib-$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "id3lib",
            "buildsystem": "autotools",
            "config-opts": [ "--enable-debug=minimum" ],
            "cleanup": [ "/bin" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "http://downloads.sourceforge.net/id3lib/id3lib-3.8.3.tar.gz",
                    "sha256": "2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079"
                },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-00-add-libz-to-compilation.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-05-create-m4-directory.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-10-fix-compilation-with-cpp-headers.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-15-fix-headers-of-main-functions.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-30-fix-utf16.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-31-fix-utf16-stringlists.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-40-deal-with-mkstemp.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-50-remove-outdated-check.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-60-add-c-wrapper-functions.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-60-fix_make_check.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-60-id3lib-missing-nullpointer-check.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-60-spelling.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-61-fix_vbr_stack_smash.patch" },
                { "type": "patch", "path": "packaging/patches/id3lib-3.8.3-62-remove-remote-icons.patch" }
            ]
        },
        {
            "name": "mp4v2",
            "buildsystem": "cmake-ninja",
            "config-opts": [
                "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
                "-DBUILD_UTILS=OFF"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/enzo1982/mp4v2/releases/download/v2.1.3/mp4v2-2.1.3.tar.bz2",
                    "sha256": "033185c17bf3c5fdd94020c95f8325be2e5356558e3913c3d6547a85dd61f7f1"
                }
            ]
        },
        {
            "name": "kid3",
            "buildsystem": "cmake-ninja",
            "config-opts": [
                "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
                "-DWITH_APPS=KDE;Qt;CLI",
                "-DWITH_MP4V2=ON",
                "-DDOCBOOK_XSL_DIR=/usr/share/xml/docbook/xml/xsl-stylesheets"
            ],
            "sources": [
                {
                    "type": "dir",
                    "path": "."
                }
            ]
        }
    ]
}
