]> git.proxmox.com Git - mirror_spl-debian.git/blobdiff - debian/dkms
Restore the compatibility to dkms < 2.2.0.3-3 (Closes: #838706)
[mirror_spl-debian.git] / debian / dkms
index 3d0d7391d8081884fabdeabfee2252eb58275037..82d82987716d4e11945cd53a4c022539fcf25e71 100644 (file)
@@ -5,18 +5,32 @@ PRE_BUILD="configure
   --prefix=/usr
   --with-config=kernel
   --with-linux=$(case `lsb_release -is` in
-                   (Debian) echo ${kernel_source_dir/%build/source} ;;
-                   (*)      echo ${kernel_source_dir} ;;
+                   (Debian)
+                     if [ -e ${kernel_source_dir/%build/source} ]
+                     then
+                       echo ${kernel_source_dir/%build/source}
+                     else
+                       # This is a kpkg exception for Proxmox 2.0
+                      echo ${kernel_source_dir}
+                     fi
+                     ;;
+                   (*)
+                     echo ${kernel_source_dir}
+                     ;;
                  esac)
   --with-linux-obj=${kernel_source_dir}
 "
-POST_REMOVE="rm -r /usr/src/spl-#MODULE_VERSION#/${kernelver}"
+POST_BUILD="cp
+  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/spl_config.h
+  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/module/Module.symvers
+  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${kernelver}/${arch}/
+"
+[ -d "${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build" ] && POST_INSTALL=${POST_BUILD}
 REMAKE_INITRD="no"
-MAKE[0]="make && make install-data-local && make -C include install"
+MAKE[0]="make"
 BUILT_MODULE_NAME[0]="spl"
 BUILT_MODULE_LOCATION[0]="module/spl/"
 DEST_MODULE_LOCATION[0]="/extra/spl/spl"
-MAKE[1]="true"
 BUILT_MODULE_NAME[1]="splat"
 BUILT_MODULE_LOCATION[1]="module/splat/"
-DEST_MODULE_LOCATION[1]="/extra/spl/splat"
+DEST_MODULE_LOCATION[1]="/extra/splat/splat"