{
    "id": "org.kde.kube",
    "branch": "master",
    "runtime": "org.kde.Platform",
    "runtime-version": "5.12",
    "sdk": "org.kde.Sdk",
    "command": "kubewrapper.sh",
    "rename-icon": "kube_icon",
    "tags": ["nightly"],
    "desktop-file-name-prefix": "(Nightly) ",
    "finish-args": [
        "--share=ipc",
        "--socket=x11",
        "--socket=wayland",
        "--device=dri",
        "--filesystem=host",
        "--filesystem=/tmp",
        "--share=network",
        "--env=SASL_PATH=/usr/lib/sasl2/"
    ],
    "separate-locales": false,

    "modules": [
        "boost.json",
        "gpgme.json",
        {
            "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib",
                            "-DCMAKE_C_COMPILER=/usr/bin/clang", "-DCMAKE_CXX_COMPILER=/usr/bin/clang++", "-DWITH_KJOB=OFF"],
            "name": "kasync",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "git://anongit.kde.org/kasync.git", "branch": "master" } ]
        },
        {
            "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"],
            "name": "kmime",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "git://anongit.kde.org/kmime.git", "branch": "Applications/18.12" } ]
        },
        {
            "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"],
            "name": "kimap2",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "git://anongit.kde.org/kimap2.git", "branch": "master" } ]
        },
        {
            "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"],
            "name": "kcontacts",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcontacts.git", "branch": "Applications/18.12" } ]
        },
        {
            "config-opts": [ "-DCMAKE_INSTALL_LIBDIR=lib" ],
            "name": "libical",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "https://github.com/libical/libical.git", "branch": "v3.0.4" } ]
        },
        {
            "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"],
            "name": "kcalcore",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcalcore.git", "branch": "v18.12.1" } ]
        },
        {
            "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"],
            "name": "kdav2",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "git://anongit.kde.org/kdav2.git", "branch": "master" } ]
        },
        {
            "name": "libgit2",
            "buildsystem": "cmake-ninja",
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/libgit2/libgit2.git",
                    "branch": "v0.27.8"
                }
            ]
        },
        {
            "name": "lmdb",
            "sources": [ { "type": "git", "url": "git://github.com/LMDB/lmdb.git", "branch": "LMDB_0.9.18"}],
            "no-autogen": true,
            "make-install-args": ["prefix=/app"],
            "subdir" : "libraries/liblmdb"
        },
        {
            "name": "curl",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "https://github.com/curl/curl.git", "branch": "curl-7_55_0"} ]
        },
        {
            "name": "xapian",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://oligarchy.co.uk/xapian/1.4.2/xapian-core-1.4.2.tar.xz",
                    "sha256": "aec2c4352998127a2f2316218bf70f48cef0a466a87af3939f5f547c5246e1ce"
                }
            ],
            "cleanup": [
                "/lib/libxapian.la",
                "/share/doc/xapian-core",
                "/bin/xapian-*"
            ]
        },
        {
            "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib",
                            "-DCMAKE_C_COMPILER=/usr/bin/clang", "-DCMAKE_CXX_COMPILER=/usr/bin/clang++"],
            "name": "sink",
            "buildsystem": "cmake-ninja",
            "sources": [
                { "type": "git", "url": "git://anongit.kde.org/sink.git", "branch": "develop" }
            ],
            "modules": [
                {
                    "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib", "-DFLATBUFFERS_BUILD_SHAREDLIB=ON", "-DFLATBUFFERS_BUILD_FLATC=ON", "-DFLATBUFFERS_INSTALL=ON", "-DCMAKE_BUILD_TYPE=Release"],
                    "name": "flatbuffers",
                    "buildsystem": "cmake-ninja",
                    "sources": [ { "type": "git", "url": "https://github.com/google/flatbuffers.git", "branch": "v1.10.0" } ]
                }
            ]
        },
        {
            "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"],
            "name": "kube",
            "buildsystem": "cmake-ninja",
            "sources": [ { "type": "git", "url": "git://anongit.kde.org/kube.git", "branch": "develop" } ]
        },
        {
            "name": "kubewrapper",
            "buildsystem": "simple",
            "build-commands": [
                "cp kubewrapper.sh /app/bin/kubewrapper.sh",
                "chmod +x /app/bin/kubewrapper.sh"
            ],
            "sources": [
                {
                    "type": "script",
                    "commands": ["gpg-agent --homedir ~/.gnupg --daemon --pinentry-program /app/bin/pinentry-qt", "kube", "gpg-connect-agent killagent /bye"],
                    "dest-filename": "kubewrapper.sh"
                }
            ]
        }
    ]
}
