{
    "id": "org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive",
    "runtime": "org.gnome.gitlab.somas.Apostrophe",
    "branch": "stable",
    "sdk": "org.gnome.Sdk",
    "build-extension": true,
    "separate-locales": false,
    "appstream-compose": false,
    "finish-args": [
        ],
    "build-options" : {
        "prefix": "/app/extensions/TexLive",
        "cflags": "-O2 -g",
        "cxxflags": "-O2 -g",
        "env": {
          "PATH": "/app/extensions/TexLive/bin:/app/extensions/TexLive/2019/bin/x86_64-linux:/app/bin:/usr/bin"
        }
    },
    "cleanup": ["/bin/wget"],
    "modules": [
        {
            "name": "wget",
            "builddir": true,
            "config-opts": ["--prefix=/app/extensions/TexLive"],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://ftp.gnu.org/gnu/wget/wget-1.19.4.tar.gz",
                    "sha256": "93fb96b0f48a20ff5be0d9d9d3c4a986b469cb853131f9d5fe4cc9cecbc8b5b5"
                }
            ]
        },
        {
            "name": "texlive",
            "builddir": false,
            "build-options" : {
                "build-args": ["--share=network"],
                "config-opts": ["--prefix=/app/extensions/TexLive"]
            },
            "build-commands": [
            ],
            "sources": [
                {
                    "type": "file",
                    "path": "texlive_install.sh",
                    "dest-filename": "configure"
                }
            ]
        },
        {
            "name": "appdata",
            "buildsystem": "simple",
            "build-commands": [
                "mkdir -p /app/extensions/TexLive/share/appdata",
                "install -Dm644 org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml /app/extensions/TexLive/share/appdata/org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml",
                "appstream-compose --basename=org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive --prefix=/app/extensions/TexLive --origin=flatpak org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive"
            ],
            "sources": [
                {
                    "type": "file",
                    "path": "org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml"
                }
            ]
        }
    ]
}
