Linux: g/c leftover fence in zfs_znode_alloc
[zfs.git] / scripts / dkms.mkconf
blob28d9609f721b424aa43c78315fe8ad0ecdbf41ff
1 #!/bin/sh
3 PROG=$0
5 pkgcfg=/etc/sysconfig/zfs
7 while getopts "n:v:c:f:" opt; do
8 case $opt in
9 n) pkgname=$OPTARG ;;
10 v) pkgver=$OPTARG ;;
11 c) pkgcfg=$OPTARG ;;
12 f) filename=$OPTARG ;;
13 esac
14 done
16 if [ -z "${pkgname}" ] || [ -z "${pkgver}" ] || [ -z "${filename}" ]; then
17 echo "Usage: $PROG -n <pkgname> -v <pkgver> -c <pkgcfg> -f <filename>"
18 exit 1
21 cat >${filename} <<EOF
22 PACKAGE_NAME="${pkgname}"
23 PACKAGE_VERSION="${pkgver}"
24 PACKAGE_CONFIG="${pkgcfg}"
25 PRE_BUILD="configure
26 --prefix=/usr
27 --with-config=kernel
28 --with-linux=\$(
29 case \`lsb_release -is\` in
30 (Debian|Devuan)
31 if [[ -e \${kernel_source_dir/%build/source} ]]
32 then
33 echo \${kernel_source_dir/%build/source}
34 else
35 # A kpkg exception for Proxmox 2.0
36 echo \${kernel_source_dir}
39 (*)
40 echo \${kernel_source_dir}
42 esac
44 --with-linux-obj=\${kernel_source_dir}
45 \$(
46 [[ -n \"\${ICP_ROOT}\" ]] && \\
48 echo --with-qat=\"\${ICP_ROOT}\"
51 \$(
52 [[ -r \${PACKAGE_CONFIG} ]] \\
53 && source \${PACKAGE_CONFIG} \\
54 && shopt -q -s extglob \\
55 && \\
57 if [[ \${ZFS_DKMS_ENABLE_DEBUG,,} == @(y|yes) ]]
58 then
59 echo --enable-debug
61 if [[ \${ZFS_DKMS_ENABLE_DEBUGINFO,,} == @(y|yes) ]]
62 then
63 echo --enable-debuginfo
68 POST_BUILD="scripts/dkms.postbuild
69 -n \${PACKAGE_NAME}
70 -v \${PACKAGE_VERSION}
71 -a \${arch}
72 -k \${kernelver}
73 -t \${dkms_tree}
75 AUTOINSTALL="yes"
76 REMAKE_INITRD="no"
77 MAKE[0]="make"
78 STRIP[0]="\$(
79 [[ -r \${PACKAGE_CONFIG} ]] \\
80 && source \${PACKAGE_CONFIG} \\
81 && shopt -q -s extglob \\
82 && [[ \${ZFS_DKMS_DISABLE_STRIP,,} == @(y|yes) ]] \\
83 && echo -n no
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"