void-packages/srcpkgs/fwupd/template

91 lines
2.7 KiB
Bash

# Template file for 'fwupd'
pkgname=fwupd
version=1.5.2
revision=1
build_style=meson
build_helper="gir"
# tests require unpackaged umockdev
configure_args="-Dsupported_build=true
-Dconsolekit=false -Dgtkdoc=true -Dintrospection=true
-Dsystemd=false -Dplugin_altos=false -Dtests=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-objcopy=${XBPS_CROSS_BASE}/usr/bin/objcopy
-Defi-libdir=${XBPS_CROSS_BASE}/usr/lib -Delogind=true"
hostmakedepends="dejavu-fonts-ttf gnutls-tools help2man pkg-config gcab
vala glib-devel polkit gettext gtk-doc"
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
libcurl-devel"
depends="udisks2"
conf_files="
/etc/fwupd/*.conf
/etc/fwupd/remotes.d/*.conf"
short_desc="Daemon to allow session software to update firmware"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="LGPL-2.1-or-later"
homepage="https://github.com/hughsie/fwupd"
distfiles="https://github.com/hughsie/fwupd/archive/${version}.tar.gz"
checksum=bc7a1eb5e494810e2622442c2942b1a06d926c906db3b2612c3e8c892806ff56
replaces="fwupdate>=0"
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*|arm*|aarch64*) _have_uefi=yes;;
esac
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*) ;;
*) configure_args+=" -Dplugin_msr=false";;
esac
if [ -n "$_have_uefi" ]; then
hostmakedepends+=" efivar"
makedepends+=" libefivar-devel gnu-efi-libs"
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*) makedepends+=" libsmbios-devel";;
*) configure_args+=" -Dplugin_dell=false";;
esac
else
configure_args+=" -Dplugin_uefi=false -Dplugin_redfish=false"
configure_args+=" -Dplugin_dell=false"
fi
if [ "$CROSS_BUILD" ]; then
configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"
configure_args+=" -Dman=false"
# steal man pages from native package
hostmakedepends+=" fwupd"
else
configure_args+=" -Dman=true"
fi
pre_configure() {
# Replace the values from our patch into the system itself
vsed -i -e "s|@XBPS_CROSS_BASE@|${XBPS_CROSS_BASE}|g" meson.build
}
post_install() {
if [ "$CROSS_BUILD" ]; then
for _page in dbxtool dfu-tool fwupdagent fwupdate fwupdmgr fwupdtool fwupdtpmevlog
do
vman /usr/share/man/man1/$_page.1
done
fi
}
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
vmove usr/share/gtk-doc
}
}