5 pkgcfg
=/etc
/sysconfig
/zfs
7 while getopts "n:v:c:f:" opt
; do
12 f
) filename
=$OPTARG ;;
16 if [ -z "${pkgname}" ] || [ -z "${pkgver}" ] || [ -z "${filename}" ]; then
17 echo "Usage: $PROG -n <pkgname> -v <pkgver> -c <pkgcfg> -f <filename>"
21 cat >${filename} <<EOF
22 PACKAGE_NAME="${pkgname}"
23 PACKAGE_VERSION="${pkgver}"
24 PACKAGE_CONFIG="${pkgcfg}"
29 case \`lsb_release -is\` in
31 if [[ -e \${kernel_source_dir/%build/source} ]]
33 echo \${kernel_source_dir/%build/source}
35 # A kpkg exception for Proxmox 2.0
36 echo \${kernel_source_dir}
40 echo \${kernel_source_dir}
44 --with-linux-obj=\${kernel_source_dir}
46 [[ -n \"\${ICP_ROOT}\" ]] && \\
48 echo --with-qat=\"\${ICP_ROOT}\"
52 [[ -r \${PACKAGE_CONFIG} ]] \\
53 && source \${PACKAGE_CONFIG} \\
54 && shopt -q -s extglob \\
57 if [[ \${ZFS_DKMS_ENABLE_DEBUG,,} == @(y|yes) ]]
61 if [[ \${ZFS_DKMS_ENABLE_DEBUGINFO,,} == @(y|yes) ]]
63 echo --enable-debuginfo
68 POST_BUILD="scripts/dkms.postbuild
70 -v \${PACKAGE_VERSION}
79 [[ -r \${PACKAGE_CONFIG} ]] \\
80 && source \${PACKAGE_CONFIG} \\
81 && shopt -q -s extglob \\
82 && [[ \${ZFS_DKMS_DISABLE_STRIP,,} == @(y|yes) ]] \\
85 STRIP[1]="\${STRIP[0]}"
86 STRIP[2]="\${STRIP[0]}"
87 STRIP[3]="\${STRIP[0]}"
88 STRIP[4]="\${STRIP[0]}"
89 STRIP[5]="\${STRIP[0]}"
90 STRIP[6]="\${STRIP[0]}"
91 STRIP[7]="\${STRIP[0]}"
92 STRIP[8]="\${STRIP[0]}"
93 BUILT_MODULE_NAME[0]="zavl"
94 BUILT_MODULE_LOCATION[0]="module/avl/"
95 DEST_MODULE_LOCATION[0]="/extra/avl/avl"
96 BUILT_MODULE_NAME[1]="znvpair"
97 BUILT_MODULE_LOCATION[1]="module/nvpair/"
98 DEST_MODULE_LOCATION[1]="/extra/nvpair/znvpair"
99 BUILT_MODULE_NAME[2]="zunicode"
100 BUILT_MODULE_LOCATION[2]="module/unicode/"
101 DEST_MODULE_LOCATION[2]="/extra/unicode/zunicode"
102 BUILT_MODULE_NAME[3]="zcommon"
103 BUILT_MODULE_LOCATION[3]="module/zcommon/"
104 DEST_MODULE_LOCATION[3]="/extra/zcommon/zcommon"
105 BUILT_MODULE_NAME[4]="zfs"
106 BUILT_MODULE_LOCATION[4]="module/zfs/"
107 DEST_MODULE_LOCATION[4]="/extra/zfs/zfs"
108 BUILT_MODULE_NAME[5]="icp"
109 BUILT_MODULE_LOCATION[5]="module/icp/"
110 DEST_MODULE_LOCATION[5]="/extra/icp/icp"
111 BUILT_MODULE_NAME[6]="zlua"
112 BUILT_MODULE_LOCATION[6]="module/lua/"
113 DEST_MODULE_LOCATION[6]="/extra/lua/zlua"
114 BUILT_MODULE_NAME[7]="spl"
115 BUILT_MODULE_LOCATION[7]="module/spl/"
116 DEST_MODULE_LOCATION[7]="/extra/spl/spl"
117 BUILT_MODULE_NAME[8]="zzstd"
118 BUILT_MODULE_LOCATION[8]="module/zstd/"
119 DEST_MODULE_LOCATION[8]="/extra/zstd/zzstd"