void-packages/srcpkgs/fwupd/template

89 lines
2.5 KiB
Bash

# Template file for 'fwupd'
pkgname=fwupd
version=2.0.1
revision=1
build_style=meson
build_helper="gir qemu"
configure_args="-Dsupported_build=enabled -Dconsolekit=disabled
-Dsystemd=disabled -Delogind=enabled -Dintrospection=enabled
-Defi_binary=false"
hostmakedepends="dejavu-fonts-ttf gnutls-tools pkg-config gcab gi-docgen vala
glib-devel polkit gettext pango python3-gobject python3-Pillow
protobuf-c-devel"
makedepends="libxmlb-devel cairo-devel colord-devel libarchive-devel
gnutls-devel gpgme-devel json-glib-devel polkit-devel sqlite-devel gcab-devel
pango-devel elogind-devel flashrom-devel tpm2-tss-devel libjcat-devel
libcurl-devel protobuf-c-devel pciutils-devel gi-docgen"
depends="dbus udisks2"
checkdepends="umockdev"
conf_files="
/etc/fwupd/*.conf
/etc/fwupd/remotes.d/*.conf"
short_desc="Daemon to allow session software to update firmware"
maintainer="dataCobra <datacobra@thinkbot.de>"
license="LGPL-2.1-or-later"
homepage="https://github.com/fwupd/fwupd"
changelog="https://github.com/fwupd/fwupd/releases"
distfiles="https://github.com/fwupd/fwupd/archive/${version}.tar.gz"
checksum=2266ed0f655e3268221a0f8bd34ab41e1e80b9092978b86fc080e59268b01486
replaces="fwupdate>=0"
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*)
_have_uefi=yes
_plugin_msr=yes
;;
arm*|aarch64*)
_have_uefi=yes;;
esac
if [ -z "$_plugin_msr" ]; then
configure_args+=" -Dplugin_msr=disabled"
fi
if [ -n "$_have_uefi" ]; then
makedepends+=" libefivar-devel fwupd-efi"
depends+=" fwupd-efi"
else
configure_args+=" -Dplugin_redfish=disabled -Dplugin_uefi_capsule=disabled -Dplugin_uefi_pk=disabled"
fi
pre_build() {
# help gi-docgen find gi files on cross
if [ -n "$CROSS_BUILD" ]; then
export XDG_DATA_DIRS=/usr/$XBPS_CROSS_TRIPLET/usr/share/
fi
}
if [ -n "$CROSS_BUILD" ]; then
configure_args+=" -Dvendor_ids_dir=${XBPS_CROSS_BASE}/usr/share/hwdata/"
fi
post_install() {
vcompletion data/bash-completion/fwupdmgr bash fwupdmgr
vcompletion data/bash-completion/fwupdtool bash fwupdtool
}
fwupd-tests_package() {
short_desc+=" - self-tests"
pkg_install() {
vmove usr/libexec/installed-tests
vmove usr/share/installed-tests
}
}
fwupd-devel_package() {
depends="${sourcepkg}>=${version}_${revision} libglib-devel libcurl-devel
libjcat-devel libgusb-devel libxmlb-devel libarchive-devel gcab-devel
json-glib-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share/gir-1.0
vmove usr/share/vala
vmove usr/share/doc
}
}