File debian.ethercat-dkms.dkms of Package ethercat
kmajorminor=`echo $kernelver | cut -d . --complement -f 3-`
CONFIGURE_ARGS="--enable-sii-assign --disable-rt-syslog --disable-tool --disable-userlib --enable-generic --enable-ccat --disable-tty"
CONFIGURE_ARGS+=" --with-linux-dir=$kernel_source_dir"
PACKAGE_NAME="ethercat-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
AUTOINSTALL="YES"
BUILT_MODULE_NAME[0]="ec_master"
BUILT_MODULE_LOCATION[0]="master/"
DEST_MODULE_LOCATION[0]="/kernel/extra/ethercat"
BUILT_MODULE_NAME[1]="ec_generic"
BUILT_MODULE_LOCATION[1]="devices/"
DEST_MODULE_LOCATION[1]="/kernel/extra/ethercat"
BUILT_MODULE_NAME[2]="ec_ccat"
BUILT_MODULE_LOCATION[2]="devices/ccat/"
DEST_MODULE_LOCATION[2]="/kernel/extra/ethercat"
POST_BUILD="save_module_symvers $dkms_tree"
for km in e1000 e1000e igb igbvf ixgbevf; do
if [ -r $source_tree/ethercat-dkms-#MODULE_VERSION#/devices/$km/$km-${kmajorminor}-ethercat.h ]; then
idx=${#BUILT_MODULE_NAME[@]}
BUILT_MODULE_NAME[$idx]="ec_$km"
BUILT_MODULE_LOCATION[$idx]="devices/$km/"
DEST_MODULE_LOCATION[$idx]="/kernel/extra/ethercat"
CONFIGURE_ARGS+=" --enable-$km"
else
CONFIGURE_ARGS+=" --disable-$km"
fi
done
for km in 8139too e100 r8169; do
if [ -r $source_tree/ethercat-dkms-#MODULE_VERSION#/devices/$km-$kmajorminor-ethercat.c ]; then
idx=${#BUILT_MODULE_NAME[@]}
BUILT_MODULE_NAME[$idx]="ec_$km"
BUILT_MODULE_LOCATION[$idx]="devices/"
DEST_MODULE_LOCATION[$idx]="/kernel/extra/ethercat"
CONFIGURE_ARGS+=" --enable-$km"
else
CONFIGURE_ARGS+=" --disable-$km"
fi
done
MAKE[0]="./configure ${CONFIGURE_ARGS} && make modules"