{
    "app-id": "org.gajim.Gajim",
    "runtime": "org.gnome.Platform",
    "runtime-version": "3.26",
    "sdk": "org.gnome.Sdk",
    "command": "gajim",
    "tags": ["nightly"],
    "desktop-file-name-prefix": "(Nightly) ",
    "finish-args": [
        /* X11 + XShm access */
        "--share=ipc",
        "--socket=x11",
        /* Wayland access */
        "--socket=wayland",
        /* Needs to talk to the network: */
        "--share=network",
        "--filesystem=home",
        "--socket=system-bus"
    ],
    "build-options": {
        "cflags": "-O2 -g",
        "cxxflags": "-O2 -g"
    },
    "cleanup": [
        "/include",
        "/lib/debug",
        "/lib/pkgconfig",
        "/share/aclocal",
        "/share/doc",
        "/share/man",
        "*.a",
        "*.la"
    ],
    "modules": [
        {
            "name": "python3-pycparser",
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://pypi.python.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz",
                    "sha256": "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226"
                }
            ]
        },
        {
            "name": "python3-cffi",
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://files.pythonhosted.org/packages/10/f7/3b302ff34045f25065091d40e074479d6893882faef135c96f181a57ed06/cffi-1.11.4.tar.gz",
                    "sha256": "df9083a992b17a28cd4251a3f5c879e0198bb26c9e808c4647e0a18739f1d11d"
                }
            ]
        },
        {
            "name": "python3-six",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app six-1.11.0-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl",
                    "sha256": "832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
                }
            ]
        },
        {
            "name": "python3-pyparsing",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app pyparsing-2.2.0-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/6a/8a/718fd7d3458f9fab8e67186b00abdd345b639976bc7fb3ae722e1b026a50/pyparsing-2.2.0-py2.py3-none-any.whl",
                    "sha256": "fee43f17a9c4087e7ed1605bd6df994c6173c1e977d7ade7b651292fab2bd010"
                }
            ]
        },
        {
            "name": "python3-packaging",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app packaging-16.8-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/87/1b/c39b7c65b5612812b83d6cab7ef2885eac9f6beb0b7b8a7071a186aea3b1/packaging-16.8-py2.py3-none-any.whl",
                    "sha256": "99276dc6e3a7851f32027a68f1095cd3f77c148091b092ea867a351811cfe388"
                }
            ]
        },
        {
            "name": "python3-appdirs",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app appdirs-1.4.3-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl",
                    "sha256": "d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e"
                }
            ]
        },
        {
            "name": "python3-setuptools",
            "ensure-writable": [
                "easy-install.pth",
                "setuptools.pth"
            ],
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://files.pythonhosted.org/packages/6c/54/f7e9cea6897636a04e74c3954f0d8335cc38f7d01e27eec98026b049a300/setuptools-38.5.1.zip",
                    "sha256": "6425484c08e99a98a42209c25c3d325f749230b55284d66192784f941a7e6628"
                }
            ]
        },
        {
            "name": "python3-asn1crypto",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app asn1crypto-0.24.0-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl",
                    "sha256": "2f1adbb7546ed199e3c90ef23ec95c5cf3585bac7d11fb7eb562a3fe89c64e87"
                }
            ]
        },
        {
            "name": "python3-idna",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app idna-2.6-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl",
                    "sha256": "8c7309c718f94b3a625cb648ace320157ad16ff131ae0af362c9f21b80ef6ec4"
                }
            ]
        },
        {
            "name": "python3-cryptography",
            "ensure-writable": [
                "easy-install.pth"
            ],
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://pypi.python.org/packages/78/c5/7188f15a92413096c93053d5304718e1f6ba88b818357d05d19250ebff85/cryptography-2.1.4.tar.gz",
                    "sha256": "e4d967371c5b6b2e67855066471d844c5d52d210c36c28d49a8507b96e2c5291"
                }
            ]
        },
        {
            "name": "python3-pyopenssl",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app pyOpenSSL-17.5.0-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/79/db/7c0cfe4aa8341a5fab4638952520d8db6ab85ff84505e12c00ea311c3516/pyOpenSSL-17.5.0-py2.py3-none-any.whl",
                    "sha256": "07a2de1a54de07448732a81e38a55df7da109b2f47f599f8bb35b0cbec69d4bd"
                }
            ]
        },
        {
            "name": "python3-pyasn1",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app pyasn1-0.4.2-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/ba/fe/02e3e2ee243966b143657fb8bd6bc97595841163b6d8c26820944acaec4d/pyasn1-0.4.2-py2.py3-none-any.whl",
                    "sha256": "d5cd6ed995dba16fad0c521cfe31cd2d68400b53fcc2bce93326829be73ab6d1"
                }
            ]
        },
        {
            "name": "python3-dbus-python",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://pypi.python.org/packages/ad/1b/76adc363212c642cabbf9329457a918308c0b9b5d38ce04d541a67255174/dbus-python-1.2.4.tar.gz",
                    "sha256": "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
                }
            ]
        },
        /* ESession support */
        {
            "name": "python3-pycrypto",
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz",
                    "sha256": "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c"
                },
                {
                    "type": "patch",
                    "path": "flatpak/CVE-2013-7459.patch"
                }
            ]
        },
        /* gnupg support */
        {
            "name": "python3-python-gnupg",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app python_gnupg-0.4.1-py2.py3-none-any.whl"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://pypi.python.org/packages/7a/f2/f655f52ff21457138d4a002aa0f67f1923cf682560b354cacecde1b2c767/python_gnupg-0.4.1-py2.py3-none-any.whl",
                    "sha256": "1e4aa381bad3edbbdfcfb0ed0de73b26d6115f5090cdae9b5b6f6ff177a66aa7"
                }
            ]
        },
        /* Zeroconf support */
        {
            "name": "avahi",
            "cleanup": [
                "/bin",
                "/lib/avahi",
                "/share"
            ],
            "config-opts": [
                "--with-distro=none",
                "--disable-qt3",
                "--disable-qt4",
                "--disable-libdaemon",
                "--disable-pygtk",
                "--disable-gdbm",
                "--disable-mono",
                "--disable-monodoc",
                "--disable-manpages"
            ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/lathiat/avahi.git",
                    "branch": "v0.7"
                }
            ]
        },
        /* OMEMO support */
        {
            "name": "protobuf",
            "ensure-writable": [
                "easy-install.pth",
                "setuptools.pth"
            ],
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://files.pythonhosted.org/packages/14/03/ff5279abda7b46e9538bfb1411d42831b7e65c460d73831ed2445649bc02/protobuf-3.5.1.tar.gz",
                    "sha256": "95b78959572de7d7fafa3acb718ed71f482932ddddddbd29ba8319c10639d863"
                }
            ]
        },
        {
            "name": "python3-axolotl-curve25519",
            "ensure-writable": [
                "easy-install.pth"
            ],
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://files.pythonhosted.org/packages/69/e0/9605cac4c83c12d0bef5c2e9992f0bcbce4fae9a252899d545ccb7dc8717/python-axolotl-curve25519-0.1.tar.gz",
                    "sha256": "c559f6a5bf51e869325b36bd83c14cccd7dec1c6e7599e797f9ba27a72d339c0"
                }
            ]
        },
        {
            "name": "python3-axolotl",
            "ensure-writable": [
                "easy-install.pth",
                "setuptools.pth"
            ],
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://files.pythonhosted.org/packages/7f/9d/410ce5c2322180cae7025e52e2f91f585d2be71f30ebbcfd605d2c9a1cd5/python-axolotl-0.1.39.tar.gz",
                    "sha256": "9af9c937d0d05ebea414f1be79ecc7517cc3541a77101941e6a2a71bdd2b6e25"
                }
            ]
        },
        {
            "name": "python3-nbxmpp",
            "buildsystem": "simple",
            "build-commands": [
                "python3 setup.py install --prefix=/app"
            ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://dev.gajim.org/gajim/python-nbxmpp.git",
                    "branch": "nbxmpp-0.6.4"
                }
            ]
        },
        {
            "name": "gajim",
            "buildsystem": "simple",
            "build-commands": [
                "pip3 install --prefix=/app ."
            ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://dev.gajim.org/gajim/gajim.git"
                },
                {
                    "type": "archive",
                    "url": "https://ftp.gajim.org/plugins_1/plugin_installer.zip",
                    "sha256": "a4ee63a4b7fd213236f30f23ff0535d63bad2fd276363d4ac8d320da63d4d09c",
                    "dest": "gajim/data/plugins/plugin_installer"
                }
            ]
        }
    ]
}
