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}"
32 if [ -e "\${kernel_source_dir/%build/source}" ]
34 echo "\${kernel_source_dir/%build/source}"
36 echo "\${kernel_source_dir}"
39 --with-linux-obj="\${kernel_source_dir}"
41 [[ -n \"\${ICP_ROOT}\" ]] && \\
43 echo --with-qat=\"\${ICP_ROOT}\"
47 [[ -r \${PACKAGE_CONFIG} ]] \\
48 && source \${PACKAGE_CONFIG} \\
49 && shopt -q -s extglob \\
52 if [[ \${ZFS_DKMS_ENABLE_DEBUG,,} == @(y|yes) ]]
56 if [[ \${ZFS_DKMS_ENABLE_DEBUGINFO,,} == @(y|yes) ]]
58 echo --enable-debuginfo
63 POST_BUILD="scripts/dkms.postbuild
65 -v \${PACKAGE_VERSION}
73 [[ -r \${PACKAGE_CONFIG} ]] \\
74 && source \${PACKAGE_CONFIG} \\
75 && shopt -q -s extglob \\
76 && [[ \${ZFS_DKMS_DISABLE_STRIP,,} == @(y|yes) ]] \\
79 STRIP[1]="\${STRIP[0]}"
80 BUILT_MODULE_NAME[0]="zfs"
81 BUILT_MODULE_LOCATION[0]="module/"
82 DEST_MODULE_LOCATION[0]="/extra"
83 BUILT_MODULE_NAME[1]="spl"
84 BUILT_MODULE_LOCATION[1]="module/"
85 DEST_MODULE_LOCATION[1]="/extra"