1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Description: Skip building if BACKLIGHT_CLASS_DEVICE is disabled
Avoid a FTBFS when BACKLIGHT_CLASS_DEVICE is disabled
Author: Paolo Pisati <paolo.pisati@canonical.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1837073
--- ddcci-driver-linux-0.3.2.orig/dkms.conf
+++ ddcci-driver-linux-0.3.2/dkms.conf
@@ -9,3 +9,8 @@ DEST_MODULE_LOCATION[0]="/extra"
DEST_MODULE_LOCATION[1]="/extra"
MAKE[0]="make KVER=$kernelver -C ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build"
AUTOINSTALL="yes"
+# Don't build module when BACKLIGHT_CLASS_DEVICE is disabled
+if ! grep -q "^CONFIG_BACKLIGHT_CLASS_DEVICE=[ym]$" "$kernel_source_dir/.config" 2>/dev/null ; then
+ echo "BACKLIGHT_CLASS_DEVICE disabled in this kernel, not building module." >&2
+ BUILD_EXCLUSIVE_ARCH="^do_not_build$"
+fi
|