5 pkgcfg
=/etc
/sysconfig
/spl
7 while getopts "n:v:c:f:" opt
; do
12 f
) filename
=$OPTARG ;;
16 if [ -z "${pkgname}" -o -z "${pkgver}" -o -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}"
28 --with-linux=\${kernel_source_dir}
29 --with-linux-obj=\${kernel_source_dir}
31 [[ -r \${PACKAGE_CONFIG} ]] \\
32 && source \${PACKAGE_CONFIG} \\
33 && shopt -q -s extglob \\
36 if [[ \${SPL_DKMS_ENABLE_DEBUG,,} == @(y|yes) ]]
40 if [[ \${SPL_DKMS_ENABLE_DEBUG_KMEM,,} == @(y|yes) ]]
42 echo --enable-debug-kmem
44 if [[ \${SPL_DKMS_ENABLE_DEBUG_KMEM_TRACKING,,} == @(y|yes) ]]
46 echo --enable-debug-kmem-tracking
48 if [[ \${SPL_DKMS_ENABLE_ATOMIC_SPINLOCKS,,} == @(y|yes) ]]
50 echo --enable-atomic-spinlocks
55 POST_BUILD="scripts/dkms.postbuild
57 -v \${PACKAGE_VERSION}
66 [[ -r \${PACKAGE_CONFIG} ]] \\
67 && source \${PACKAGE_CONFIG} \\
68 && shopt -q -s extglob \\
69 && [[ \${SPL_DKMS_DISABLE_STRIP,,} == @(y|yes) ]] \\
72 STRIP[1]="\${STRIP[0]}"
73 BUILT_MODULE_NAME[0]="spl"
74 BUILT_MODULE_LOCATION[0]="module/spl/"
75 DEST_MODULE_LOCATION[0]="/extra/spl/spl"
76 BUILT_MODULE_NAME[1]="splat"
77 BUILT_MODULE_LOCATION[1]="module/splat/"
78 DEST_MODULE_LOCATION[1]="/extra/splat/splat"