void-packages/srcpkgs/fwupd/template

83 lines
2.6 KiB
Bash

# Template file for 'fwupd'
pkgname=fwupd
version=1.4.1
revision=1
build_style=meson
build_helper="gir"
# manpages fail to build
# tests require unpackaged umockdev
configure_args="-Dconsolekit=false -Dgtkdoc=false -Dintrospection=true
-Dsystemd=false -Dplugin_altos=false -Dtests=false -Dman=false
-Dpkcs7=false -Db_lto=false -Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
-Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/usr/bin/ld
-Defi-libdir=${XBPS_CROSS_BASE}/usr/lib -Delogind=true"
hostmakedepends="dejavu-fonts-ttf gnutls-tools help2man pkg-config gcab
vala glib-devel polkit gettext"
makedepends="libxmlb-devel cairo-devel colord-devel libarchive-devel
gnutls-devel gpgme-devel json-glib-devel libgusb-devel polkit-devel
sqlite-devel libsoup-devel gcab-devel pango-devel python3-gobject
python3-Pillow elogind-devel tpm2-tss-devel libjcat-devel"
short_desc="Daemon to allow session software to update firmware"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://github.com/hughsie/fwupd"
distfiles="https://github.com/hughsie/fwupd/archive/${version}.tar.gz"
checksum=39153ad966b5f05446ed359cefc3bd2705bef47d3991e3978dc30003775faa0b
# no efi on non-efi platforms
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*|aarch64*|arm*) _have_efi=yes;;
esac
if [ -n "$_have_efi" ]; then
hostmakedepends+=" efivar gnu-efi-libs"
makedepends+=" libefivar-devel gnu-efi-libs"
fi
conf_files="
/etc/fwupd/daemon.conf
/etc/fwupd/remotes.d/*.conf"
if [ "$CROSS_BUILD" ]; then
case "$XBPS_TARGET_MACHINE" in
arm*) # Segfaults under qemu trying to gzip non-existing files
broken="https://build.voidlinux.org/builders/armv7l_builder/builds/17377/steps/shell_3/logs/stdio";;
aarch64*) broken="https://travis-ci.org/void-linux/void-packages/jobs/618827513";;
esac
if [ -n "$_have_efi" ]; then
configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"
fi
fi
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*)
makedepends+=" libsmbios-devel"
configure_args+=" -Dplugin_dell=true"
;;
*)
configure_args+=" -Dplugin_dell=false"
if [ -z "$_have_efi" ]; then
configure_args+=" -Dplugin_uefi=false"
configure_args+=" -Dplugin_redfish=false"
fi
;;
esac
pre_configure() {
# Replace the values from our patch into the system itself
sed -i -e "s|@XBPS_CROSS_BASE@|${XBPS_CROSS_BASE}|g" meson.build
}
fwupd-devel_package() {
depends="${sourcepkg}>=${version}_${revision} libglib-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
}
}