On SuSE /lib/modules/`uname -r`/build belongs to the kernel RPM
and not to kernel-source/kernel-devel.
Check that /lib/modules/`uname -r`/build/scripts directory exist.
It belongs to kernel-source RPM on SuSE and to kernel-debug RPM on RedHat.
This check will also work for kernels from kernel.org.
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
exit 1;
}
# kernel sources required
- if ( not -d "$kernel_sources/" ) {
- print RED "$kernel_sources is required to build $package RPM.", RESET "\n";
+ if ( not -d "$kernel_sources/scripts" ) {
+ print RED "$kernel_sources/scripts is required to build $package RPM.", RESET "\n";
print RED "Please install the corresponding kernel-source or kernel-devel RPM.", RESET "\n";
$err++;
}