Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 85831a6478e14c4a8ac6452958c6e526 > files > 30

dkms-2.0.19-40.mga7.src.rpm

diff -r a2faef455ff5 -r 3f467523198a dkms
--- a/dkms	Thu Feb 26 16:41:39 2009 -0300
+++ b/dkms	Tue Mar 10 16:00:49 2009 -0300
@@ -1381,6 +1381,11 @@ function do_build()
     echo $"Building module:"
 
     invoke_command "$clean" "cleaning build area" background
+    zcat $dkms_tree/*/kernel-${kernelver_array[0]}-${arch_array[0]}/module/symvers.gz > Module.symvers 2>/dev/null
+    while [ "$count" -lt "${#built_module_name[@]}" ]; do
+	zcat $dkms_tree/*/kernel-${kernelver_array[0]}-${arch_array[0]}/module/symvers.gz > "${built_module_location[$count]}Module.symvers" 2>/dev/null
+	count=$(($count+1))
+    done
     echo $"DKMS make.log for $module-$module_version for kernel ${kernelver_array[0]} (${arch_array[0]})" >> "$dkms_tree/$module/$module_version/build/make.log"
     echo $"`date`" >> "$dkms_tree/$module/$module_version/build/make.log"
     local the_make_command=`echo $make_command | sed "s/^make/make KERNELRELEASE=${kernelver_array[0]}/"`
@@ -1425,9 +1430,11 @@ function do_build()
     # Save a copy of the new module
     mkdir "$base_dir/module" >/dev/null
     local count=0
+    echo -n | gzip -c > "$dkms_tree/$module/$module_version/${kernelver_array[0]}/${arch_array[0]}/module/symvers.gz"
     while [ "$count" -lt "${#built_module_name[@]}" ]; do
 	[ "${strip[$count]}" != "no" ] && strip -g "$dkms_tree/$module/$module_version/build/${built_module_location[$count]}${built_module_name[$count]}$module_suffix"
 	cp -f "$dkms_tree/$module/$module_version/build/${built_module_location[$count]}${built_module_name[$count]}$module_suffix" "$base_dir/module/${dest_module_name[$count]}$module_suffix" >/dev/null
+	grep -sh "${built_module_name[$count]}" "$dkms_tree/$module/$module_version/build/${built_module_location[$count]}/Module.symvers" Module.symvers | gzip -c >> "$dkms_tree/$module/$module_version/${kernelver_array[0]}/${arch_array[0]}/module/symvers.gz" 2>/dev/null
 	if [ -n "$gz_modules" ]; then
 	    gzip -9f $dkms_tree/$module/$module_version/${kernelver_array[0]}/${arch_array[0]}/module/${dest_module_name[$count]}$module_suffix
 	fi