]> git.proxmox.com Git - mirror_spl.git/commitdiff
Install header during post-build rather than post-install.
authorTom Prince <tom.prince@clusterhq.com>
Thu, 9 Oct 2014 17:08:00 +0000 (14:08 -0300)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 9 Oct 2014 19:00:25 +0000 (12:00 -0700)
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 <tom.prince@clusterhq.com>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #399

scripts/Makefile.am
scripts/dkms.mkconf
scripts/dkms.postbuild [new file with mode: 0755]
scripts/dkms.postinst [deleted file]

index 4c0d7ba4042f26b6e94519a69cb8807ceb7c572f..f146ec6e674a4cf76f3bd038edc42a1b26938e2b 100644 (file)
@@ -1,4 +1,4 @@
-EXTRA_DIST = check.sh dkms.mkconf dkms.postinst kmodtool
+EXTRA_DIST = check.sh dkms.mkconf dkms.postbuild kmodtool
 
 check:
        $(top_srcdir)/scripts/check.sh
index f9cf696927227ac56bc3782da2a74bdff61dc26b..2fa3dd2b41e7b2ff58356d8852e521f9a85898b4 100755 (executable)
@@ -56,7 +56,7 @@ PRE_BUILD="configure
     }
   )
 "
-POST_INSTALL="scripts/dkms.postinst
+POST_BUILD="scripts/dkms.postbuild
   -n \${PACKAGE_NAME}
   -v \${PACKAGE_VERSION}
   -a \${arch}
diff --git a/scripts/dkms.postbuild b/scripts/dkms.postbuild
new file mode 100755 (executable)
index 0000000..a23bbda
--- /dev/null
@@ -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 <arch> -k <kver> -n <pkgname>" \
+            "-t <tree> -v <pkgver>"
+       exit 1
+fi
+
+cp ${tree}/${pkgname}/${pkgver}/build/spl_config.h          \
+   ${tree}/${pkgname}/${pkgver}/build/module/Module.symvers \
+   ${tree}/${pkgname}/${pkgver}/${kver}/${arch}/
diff --git a/scripts/dkms.postinst b/scripts/dkms.postinst
deleted file mode 100755 (executable)
index a23bbda..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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 <arch> -k <kver> -n <pkgname>" \
-            "-t <tree> -v <pkgver>"
-       exit 1
-fi
-
-cp ${tree}/${pkgname}/${pkgver}/build/spl_config.h          \
-   ${tree}/${pkgname}/${pkgver}/build/module/Module.symvers \
-   ${tree}/${pkgname}/${pkgver}/${kver}/${arch}/