aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/dkms.mkconf
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dkms.mkconf')
-rwxr-xr-xscripts/dkms.mkconf17
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf
index 35da3b69c..fbbdc5cdb 100755
--- a/scripts/dkms.mkconf
+++ b/scripts/dkms.mkconf
@@ -25,7 +25,22 @@ PACKAGE_CONFIG="${pkgcfg}"
PRE_BUILD="configure
--prefix=/usr
--with-config=kernel
- --with-linux=\${kernel_source_dir}
+ --with-linux=\$(
+ case \`lsb_release -is\` in
+ (Debian|Devuan)
+ if [[ -e \${kernel_source_dir/%build/source} ]]
+ then
+ echo \${kernel_source_dir/%build/source}
+ else
+ # A kpkg exception for Proxmox 2.0
+ echo \${kernel_source_dir}
+ fi
+ ;;
+ (*)
+ echo \${kernel_source_dir}
+ ;;
+ esac
+ )
--with-linux-obj=\${kernel_source_dir}
--with-spl=\${source_tree}/spl-\${PACKAGE_VERSION}
--with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch}