{
    "id": "org.kde.gwenview",
    "runtime": "org.kde.Platform",
    "runtime-version": "6.7",
    "sdk": "org.kde.Sdk",
    "command": "gwenview",
    "rename-icon": "gwenview",
    "finish-args": [
        "--device=dri",
        "--filesystem=host",
        "--share=ipc",
        "--socket=fallback-x11",
        "--socket=pulseaudio",
        "--socket=wayland",
        "--filesystem=xdg-data/Trash"
    ],
    "cleanup": [
        "*.a",
        "*.la",
        "/include",
        "/lib/cmake",
        "/lib/pkgconfig",
        "/share/man"
    ],
    "modules": [
        {
            "name": "exiv2",
            "buildsystem": "cmake-ninja",
            "builddir": true,
            "config-opts": [
                "-DBUILD_SHARED_LIBS=ON",
                "-DEXIV2_ENABLE_XMP=ON",
                "-DEXIV2_ENABLE_EXTERNAL_XMP=OFF",
                "-DEXIV2_ENABLE_PNG=ON",
                "-DEXIV2_ENABLE_NLS=ON",
                "-DEXIV2_ENABLE_PRINTUCS2=ON",
                "-DEXIV2_ENABLE_LENSDATA=ON",
                "-DEXIV2_ENABLE_VIDEO=OFF",
                "-DEXIV2_ENABLE_WEBREADY=OFF",
                "-DEXIV2_ENABLE_DYNAMIC_RUNTIME=OFF",
                "-DEXIV2_ENABLE_CURL=OFF",
                "-DEXIV2_ENABLE_SSH=OFF",
                "-DEXIV2_BUILD_SAMPLES=OFF",
                "-DEXIV2_BUILD_PO=OFF",
                "-DEXIV2_BUILD_EXIV2_COMMAND=OFF",
                "-DEXIV2_BUILD_UNIT_TESTS=OFF",
                "-DEXIV2_BUILD_DOC=OFF",
                "-DEXIV2_TEAM_EXTRA_WARNINGS=OFF",
                "-DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF",
                "-DEXIV2_TEAM_USE_SANITIZERS=OFF",
                "-DEXIV2_ENABLE_WIN_UNICODE=OFF"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/Exiv2/exiv2/releases/download/v0.27.6/exiv2-0.27.6-Source.tar.gz",
                    "sha256": "4c192483a1125dc59a3d70b30d30d32edace9e14adf52802d2f853abf72db8a6",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 769,
                        "stable-only": true,
                        "url-template": "https://github.com/Exiv2/exiv2/releases/download/v$version/exiv2-$version-Source.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "cfitsio",
            "buildsystem": "simple",
            "build-commands": [
                "sed -e 's|LDFLAGS=.*|LDFLAGS=\"$LDFLAGS\"|g' -i configure.in",
                "autoreconf -vi",
                "./configure --prefix=/ --enable-reentrant",
                "make shared",
                "make utils",
                "make DESTDIR=${FLATPAK_DEST} install",
                "install -D -m644 License.txt ${FLATPAK_DEST}/share/licenses/cfitsio/LICENSE"
            ],
            "cleanup": [
                "/bin/cookbook",
                "/bin/smem",
                "/bin/testprog"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://ftp.debian.org/debian/pool/main/c/cfitsio/cfitsio_4.3.1.orig.tar.gz",
                    "sha256": "47a7c8ee05687be1e1d8eeeb94fb88f060fbf3cd8a4df52ccb88d5eb0f5062be",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 270,
                        "stable-only": true,
                        "url-template": "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "jasper",
            "buildsystem": "cmake-ninja",
            "builddir": true,
            "config-opts": [
                "-DJAS_ENABLE_SHARED=ON",
                "-DJAS_ENABLE_LIBJPEG=ON",
                "-DJAS_ENABLE_OPENGL=OFF",
                "-DJAS_LOCAL=OFF",
                "-DJAS_ENABLE_DOC=OFF",
                "-DJAS_ENABLE_PROGRAMS=OFF",
                "-DALLOW_IN_SOURCE_BUILD=ON"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/jasper-software/jasper/archive/version-4.2.4.tar.gz",
                    "sha256": "23a3d58cdeacf3abdf9fa1d81dcefee58da6ab330940790c0f27019703bfd2cd",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 1421,
                        "stable-only": true,
                        "url-template": "https://github.com/jasper-software/jasper/archive/version-$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "libraw",
            "builddir": true,
            "config-opts": [
                "--disable-examples",
                "--disable-static"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://www.libraw.org/data/LibRaw-0.21.2.tar.gz",
                    "sha256": "fe7288013206854baf6e4417d0fb63ba4ed7227bf36fff021992671c2dd34b03",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 1709,
                        "stable-only": true,
                        "url-template": "https://www.libraw.org/data/LibRaw-$version.tar.gz"
                    }
                },
                {
                    "type": "shell",
                    "commands": [
                        "autoreconf -vfi"
                    ]
                }
            ]
        },
        {
            "name": "libkdcraw",
            "buildsystem": "cmake-ninja",
            "config-opts": [
                "-DBUILD_TESTING=OFF",
                "-DBUILD_WITH_QT6=ON"
            ],
            "builddir": true,
            "sources": [
                {
                    "type": "git",
                    "url": "https://invent.kde.org/graphics/libkdcraw",
                    "branch": "master"
                }
            ]
        },
        {
            "name": "lmdb",
            "no-autogen": true,
            "make-install-args": [
                "prefix=/app"
            ],
            "subdir": "libraries/liblmdb",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.32/openldap-LMDB_0.9.32.tar.bz2",
                    "sha256": "268c849e0b1c375f7545602a45e826c5e5ad9486555c155f46ca836b34294f5f",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 6974,
                        "stable-only": true,
                        "url-template": "https://git.openldap.org/openldap/openldap/-/archive/LMDB_$version/openldap-LMDB_$version.tar.bz2"
                    }
                }
            ]
        },
        {
            "name": "baloo",
            "buildsystem": "cmake-ninja",
            "config-opts": [
                "-DBUILD_TESTING=OFF"
            ],
            "builddir": true,
            "sources": [
                {
                    "type": "git",
                    "url": "https://invent.kde.org/frameworks/baloo",
                    "tag": "v5.247.0"
                }
            ]
        },
        {
            "name": "kColorPicker",
            "buildsystem": "cmake-ninja",
            "builddir": true,
            "config-opts": [
                "-DBUILD_TESTING=OFF",
                "-DBUILD_WITH_QT6=ON"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/ksnip/kColorPicker/archive/refs/tags/v0.3.1.tar.gz",
                    "sha256": "e78c785ec4a8a22a48a91835c97601f5704b5076b154415353b0d2697dc0b4f7",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 120606,
                        "stable-only": true,
                        "url-template": "https://github.com/ksnip/kColorPicker/archive/refs/tags/v$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "kImageAnnotator",
            "buildsystem": "cmake-ninja",
            "builddir": true,
            "config-opts": [
                "-DBUILD_TESTS=OFF",
                "-DBUILD_WITH_QT6=ON",
                "-DBUILD_EXAMPLE=OFF"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/ksnip/kImageAnnotator/archive/refs/tags/v0.7.1.tar.gz",
                    "sha256": "2335c5be15a5dde34c3333c10a6339da114e2232e4c4642dea1793e491e09677",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 120605,
                        "stable-only": true,
                        "url-template": "https://github.com/ksnip/kImageAnnotator/archive/refs/tags/v$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "gwenview",
            "buildsystem": "cmake-ninja",
            "builddir": true,
            "sources": [
                {
                    "type": "dir",
                    "path": "."
                }
            ]
        }
    ]
}
