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
This commit is contained in:
Mario Limonciello 2018-08-04 16:57:50 -05:00
parent 2d37c3f64b
commit 20c0234086

View File

@ -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: