{
  "app-id": "org.freedesktop.fwupd",
  "runtime": "org.gnome.Platform",
  "runtime-version": "3.30",
  "branch": "stable",
  "sdk": "org.gnome.Sdk",
  "command": "/app/libexec/fwupd/fwupdtool",
  "finish-args": [
    "--device=all",
    "--filesystem=/boot",
    "--filesystem=/sys",
    "--filesystem=xdg-download",
    "--share=network",
    "--system-talk-name=org.freedesktop.fwupd",
    "--system-talk-name=org.freedesktop.UPower"
  ],
  "cleanup": [
    "*.a",
    "*.la",
    "/include",
    "/lib/girepository-1.0",
    "/lib/pkgconfig",
    "/share/bash-completion",
    "/share/dbus-1/system-services",
    "/share/gir-1.0",
    "/share/gtk-doc",
    "/share/info",
    "/share/man",
    "/share/pkgconfig"
  ],
  "modules": [
    "shared-modules/udev/udev-175.json",
    {
      "name": "libusb",
      "config-opts": [
        "--disable-static"
      ],
      "sources": [
        {
          "type": "archive",
          "url": "https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2",
          "sha256": "75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157"
        }
      ]
    },
    {
      "name": "gusb",
      "buildsystem": "meson",
      "config-opts": [
        "-Ddocs=false",
        "-Dvapi=false",
        "-Dtests=false"
      ],
      "cleanup": [
        "/bin/gusbcmd"
      ],
      "sources": [
        {
          "type": "archive",
          "url": "https://people.freedesktop.org/~hughsient/releases/libgusb-0.3.0.tar.xz",
          "sha256": "d8e7950f99b6ae4c3e9b8c65f3692b9635289e6cff8de40c4af41b2e9b348edc"
        }
      ]
    },
    {
      "name": "efivar",
      "buildsystem": "simple",
      "build-commands": [
        "make prefix=/app libdir=/app/lib",
        "make install prefix=/app libdir=/app/lib"
      ],
      "cleanup": [
          "/bin/efivar"
      ],
      "sources": [
        {
          "type": "archive",
          "url": "https://github.com/rhboot/efivar/releases/download/35/efivar-35.tar.bz2",
          "sha256": "1e033dc5d099a44fd473b0887dbcc4b105613efab0fb3c5df9f111ea5d147394"
        }
      ]
    },
    {
      "name": "libsmbios_c",
      "only-arches": [
        "x86_64"
      ],
      "config-opts": [
        "--disable-doxygen",
        "--disable-graphviz",
        "--disable-python"
      ],
      "cleanup": [
        "/sbin/smbios*",
        "/share/locale/*/LC_MESSAGES/libsmbios.mo"
      ],
      "sources": [
        {
          "type": "archive",
          "url": "https://github.com/dell/libsmbios/archive/v2.4.2.tar.gz",
          "sha256": "ebfe18415e24bbec06d0a9ea1066c8dcd82982555373712713d7e194138650de"
        }
      ]
    },
    {
      "name": "gnu-efi",
      "only-arches": [
        "aarch64",
        "x86_64"
      ],
      "buildsystem": "simple",
      "build-commands": [
        "make",
        "make PREFIX=/app install"
      ],
      "no-autogen": true,
      "cleanup": [
        "/bin/efivar"
      ],
      "sources": [
        {
          "type": "archive",
          "url": "http://superb-dca2.dl.sourceforge.net/project/gnu-efi/gnu-efi-3.0.9.tar.bz2",
          "sha256": "6715ea7eae1c7e4fc5041034bd3f107ec2911962ed284a081e491646b12277f0"
        }
      ]
    },
    {
      "name": "python3-olefile",
      "only-arches": [
        "aarch64",
        "x86_64"
      ],
      "buildsystem": "simple",
      "build-commands": [
        "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} olefile"
      ],
      "sources": [
        {
          "type": "file",
          "url": "https://pypi.python.org/packages/35/17/c15d41d5a8f8b98cc3df25eb00c5cee76193114c78e5674df6ef4ac92647/olefile-0.44.zip",
          "sha256": "61f2ca0cd0aa77279eb943c07f607438edf374096b66332fae1ee64a6f0f73ad"
        }
      ]
    },
    {
      "name": "python3-pillow",
      "only-arches": [
        "aarch64",
        "x86_64"
      ],
      "buildsystem": "simple",
      "build-commands": [
        "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} Pillow"
      ],
      "cleanup": [
        "/bin/*.py"
      ],
      "sources": [
        {
          "type": "file",
          "url": "https://pypi.python.org/packages/93/73/66854f63b1941aad9af18a1de59f9cf95ad1a87c801540222e332f6688d7/Pillow-4.1.1.tar.gz",
          "sha256": "00b6a5f28d00f720235a937ebc2f50f4292a5c7e2d6ab9a8b26153b625c4f431"
        }
      ]
    },
    {
      "name": "fwupd",
      "buildsystem": "meson",
      "config-opts": [
        "-Dconsolekit=false",
        "-Ddaemon=false",
        "-Dgpg=false",
        "-Dgtkdoc=false",
        "-Dintrospection=false",
        "-Dman=false",
        "-Dpkcs7=false",
        "-Dsystemd=false",
        "-Dtests=false",
        "-Defi-includedir=/app/include/efi",
        "-Defi-ldsdir=/app/lib",
        "-Defi-libdir=/app/lib",
        "--sysconfdir=/app/etc",
        "--localstatedir=/var/data"
      ],
      "build-options" : {
        "arch": {
            "i386": {
                "config-opts": [
                  "-Dplugin_dell=false",
                  "-Dplugin_uefi=false"
                ]
            },
            "arm": {
                "config-opts": [
                  "-Dplugin_dell=false",
                  "-Dplugin_uefi=false"
                ]
            },
            "aarch64": {
                "config-opts": [
                  "-Dplugin_dell=false"
                ]
            }
        }
      },
      "cleanup": [
        "/etc/dbus-1/system.d/org.freedesktop.fwupd.conf",
        "/share/fwupd/remotes.d/vendor"
      ],
      "sources": [
          {
              "type": "archive",
              "url": "https://people.freedesktop.org/~hughsient/releases/fwupd-1.1.3.tar.xz",
              "sha256": "474568a98af8ae82255c18da90ce2e4d290875da98638c4b1c44632c758314af"
          }
      ]
    }
  ]
}
