5 pkgcfg
=/etc
/sysconfig
/zfs
7 while getopts "n:v:c:f:" opt
; do
12 f
) filename
=$OPTARG ;;
17 if [ -z "${pkgname}" ] || [ -z "${pkgver}" ] || [ -z "${filename}" ] ||
19 echo "Usage: $PROG -n <pkgname> -v <pkgver> -c <pkgcfg> -f <filename>"
23 exec cat >"${filename}" <<EOF
24 PACKAGE_NAME="${pkgname}"
25 PACKAGE_VERSION="${pkgver}"
26 PACKAGE_CONFIG="${pkgcfg}"
29 --disable-dependency-tracking
33 if [ -e "\${kernel_source_dir/%build/source}" ]
35 echo "\${kernel_source_dir/%build/source}"
37 echo "\${kernel_source_dir}"
40 --with-linux-obj="\${kernel_source_dir}"
42 [[ -n \"\${ICP_ROOT}\" ]] && \\
44 echo --with-qat=\"\${ICP_ROOT}\"
48 [[ -r \${PACKAGE_CONFIG} ]] \\
49 && source \${PACKAGE_CONFIG} \\
50 && shopt -q -s extglob \\
53 if [[ \${ZFS_DKMS_ENABLE_DEBUG,,} == @(y|yes) ]]
57 if [[ \${ZFS_DKMS_ENABLE_DEBUGINFO,,} == @(y|yes) ]]
59 echo --enable-debuginfo
64 POST_BUILD="scripts/dkms.postbuild
66 -v \${PACKAGE_VERSION}
74 [[ -r \${PACKAGE_CONFIG} ]] \\
75 && source \${PACKAGE_CONFIG} \\
76 && shopt -q -s extglob \\
77 && [[ \${ZFS_DKMS_DISABLE_STRIP,,} == @(y|yes) ]] \\
80 STRIP[1]="\${STRIP[0]}"
81 BUILT_MODULE_NAME[0]="zfs"
82 BUILT_MODULE_LOCATION[0]="module/"
83 DEST_MODULE_LOCATION[0]="/extra"
84 BUILT_MODULE_NAME[1]="spl"
85 BUILT_MODULE_LOCATION[1]="module/"
86 DEST_MODULE_LOCATION[1]="/extra"