From de2a22fcb3e7e8d7c4f695aeb0caf9cdc8f82c9a Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Thu, 9 Oct 2014 14:08:00 -0300 Subject: Install header during post-build rather than post-install. New versions of dkms clean up the build directory after installing. It appears that this was always intended, but had rm -rf "/path/to/build/*" (note the quotes), which prevented it from working. Also, the build step is already installing stuff into the directory where these files go, so installing our stuff there as part of build rather than install makes sense. Signed-off-by: Tom Prince Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #399 --- scripts/dkms.postbuild | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/dkms.postbuild (limited to 'scripts/dkms.postbuild') diff --git a/scripts/dkms.postbuild b/scripts/dkms.postbuild new file mode 100755 index 000000000..a23bbdabb --- /dev/null +++ b/scripts/dkms.postbuild @@ -0,0 +1,24 @@ +#!/bin/sh + +PROG=$0 + +while getopts "a:k:n:t:v:" opt; do + case $opt in + a) arch=$OPTARG ;; + k) kver=$OPTARG ;; + n) pkgname=$OPTARG ;; + t) tree=$OPTARG ;; + v) pkgver=$OPTARG ;; + esac +done + +if [ -z "${arch}" -o -z "${kver}" -o -z "${pkgname}" -o \ + -z "${tree}" -o -z "${pkgver}" ]; then + echo "Usage: $PROG -a -k -n " \ + "-t -v " + exit 1 +fi + +cp ${tree}/${pkgname}/${pkgver}/build/spl_config.h \ + ${tree}/${pkgname}/${pkgver}/build/module/Module.symvers \ + ${tree}/${pkgname}/${pkgver}/${kver}/${arch}/ -- cgit v1.2.3