From 20c023408695f79cb6cc6474886fe217df7adb14 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Sat, 4 Aug 2018 16:57:50 -0500 Subject: [PATCH] trivial: debian: use pkg-config to determine when to turn on redfish and UEFI Fixes FTBFS in Debian due to Redfish not working on !x86 --- contrib/debian/rules | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/contrib/debian/rules b/contrib/debian/rules index 90bc91935..3bb8e4429 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules @@ -13,12 +13,6 @@ ifneq ($(CI),) export CI=--werror endif -export UEFI=-Dplugin_uefi=false -DEB_TARGET_ARCH ?= $(shell dpkg-architecture -qDEB_TARGET_ARCH) -ifeq ($(DEB_TARGET_ARCH),$(filter $(DEB_TARGET_ARCH),amd64 i386 armhf arm64)) - export UEFI=-Dplugin_uefi=true -endif - SB_STYLE := debian ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes)) SB_STYLE := ubuntu @@ -43,6 +37,11 @@ override_dh_auto_configure: else \ export DELL="-Dplugin_dell=false -Dplugin_synaptics=false"; \ fi; \ + if pkg-config --exists efivar; then \ + export UEFI="-Dplugin_uefi=true -Dplugin_redfish=true"; \ + else \ + export UEFI="-Dplugin_uefi=false -Dplugin_redfish=false"; \ + fi; \ dh_auto_configure -- $$UEFI $$DELL $$CI -Dplugin_dummy=true --libexecdir=/usr/lib override_dh_install: