PKGNAME=fwupd
PKGSEC=admin
PKGDES="Firmware update daemon and utilities"
PKGDEP="bluez curl fwupd-efi gcc-runtime glib glibc gnutls libdrm \
        libmbim libmnl libqmi libusb libxmlb modemmanager passim \
        polkit readline sqlite systemd tpm2-tss udisks-2 \
        util-linux-runtime xz zlib"
BUILDDEP="cairo gobject-introspection jinja2 vala"
# FIXME: Fwupd-efi is not yet available for ppc64el & loongson3.
PKGDEP__LOONGSON3="${PKGDEP/fwupd-efi/}"
PKGDEP__PPC64EL="${PKGDEP/fwupd-efi/}"

MESON_AFTER=(
    '-Dbash_completion=true'
    '-Dblkid=enabled'
    '-Dbluez=enabled'
    '-Dbuild=all'
    '-Ddocs=disabled'
    '-Defi_binary=false'
    '-Dfirmware-packager=true'
    '-Dfish_completion=true'
    '-Dgnutls=enabled'
    '-Dopenssl=enabled'
    '-Dhsi=disabled'
    '-Dintrospection=enabled'
    '-Dlibdrm=enabled'
    '-Dlibmnl=enabled'
    '-Dlogind=enabled'
    '-Dlvfs=true'
    '-Dman=true'
    '-Dmetainfo=true'
    '-Dp2p_policy=metadata'
    '-Dudev_hotplug=true'
    '-Dpassim=enabled'
    '-Dplugin_modem_manager=enabled'
    '-Dplugin_uefi_capsule_splash=true'
    '-Dpolkit=enabled'
    '-Dpython=/usr/bin/python3'
    '-Dqubes=false'
    '-Dreadline=enabled'
    '-Dstatic_analysis=false'
    '-Dsupported_build=disabled'
    '-Dsystemd=enabled'
    '-Dsystemd_unit_user=fwupd-refresh'
    '-Dtests=false'
    '-Dumockdev_tests=disabled'
    '-Dvalgrind=disabled'
    '-Dvendor_metadata=false'
)
# Note: hsi only available on amd64.
# Ref: https://github.com/fwupd/fwupd/blob/2f9790bab88a0c3bb68e693b4f20404bd816db3a/meson.build#L279
MESON_AFTER__AMD64=(
    "${MESON_AFTER[@]}"
    '-Dhsi=enabled'
)

PKGBREAK="fwupdate<=12-2 discover<=5.27.12 gnome-software<=42.4-1"
PKGREP="fwupdate<=12-2"
