summaryrefslogtreecommitdiffstats
path: root/scripts/dkms.postinst
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-02-17 12:10:17 -0800
committerBrian Behlendorf <[email protected]>2013-03-18 15:33:17 -0700
commitf3757573a677e8662e268f0bb8e5ffe750013088 (patch)
treea0001b1a30360d4b85f5b5e2a7229697eae6704f /scripts/dkms.postinst
parent9b2af9a097c119b818bd584eb89ca51ba475c7f2 (diff)
Refresh RPM packaging
Refresh the existing RPM packaging to conform to the 'Fedora Packaging Guidelines'. This includes adopting the kmods2 packaging standard which is used fod kmods distributed by rpmfusion for Fedora/RHEL. http://fedoraproject.org/wiki/Packaging:Guidelines http://rpmfusion.org/Packaging/KernelModules/Kmods2 While the spec files have been entirely rewritten from a user perspective the only major changes are: * The Fedora packages now have a build dependency on the rpmfusion repositories. The generic kmod packages also have a new dependency on kmodtool-1.22 but it is bundled with the source rpm so no additional packages are needed. * The kernel binary module packages have been renamed from zfs-modules-* to kmod-zfs-* as specificed by kmods2. * The is now a common kmod-zfs-devel-* package in addition to the per-kernel devel packages. The common package contains the development headers while the per-kernel package contains kernel specific build products. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1341
Diffstat (limited to 'scripts/dkms.postinst')
-rwxr-xr-xscripts/dkms.postinst24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/dkms.postinst b/scripts/dkms.postinst
new file mode 100755
index 000000000..3cbc7c7ce
--- /dev/null
+++ b/scripts/dkms.postinst
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+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/zfs_config.h \
+ ${tree}/${pkgname}/${pkgver}/build/module/Module.symvers \
+ ${tree}/${pkgname}/${pkgver}/${kver}/${arch}/