Commit 9f4c0f4d authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve build with dkms

parent 967ec4eb
......@@ -11,7 +11,7 @@
. ./functions.sh
detect_host_kernel
if [ -r $SRC_DIR/dkms.conf ] && [ `which dkms 2>/dev/null` ] ; then
if [ -r $SRC_DIR/dkms.conf ] && which dkms 2>/dev/null >/dev/null ] ; then
echo
echo "Building $MODULENAME $MODULEVERSION for $KERNELVERSION Linux kernel with dkms"
dkms_build_module
......
......@@ -288,7 +288,7 @@ detect_kernel()
detect_host_kernel()
{
local KV="$KERNELVERSION"
KERNELMANUAL="$KERNSRC$KERNELVERSION"
[ -n "$KERNELVERSION" ] || KERNELVERSION=`uname -r`
kernel_release3
......@@ -352,15 +352,17 @@ set_gcc()
dkms_build_module()
{
local DKMSOPTS=
detect_etercifs_sources
STATUS=`dkms status -m $MODULENAME -v $MODULEVERSION`
[ "$STATUS" ] || a= dkms add -m $MODULENAME -v $MODULEVERSION
BUILDDIR=$SRC_DIR
create_builddir || fatal
change_cifsversion
a= dkms uninstall -m $MODULENAME -v $MODULEVERSION --rpm_safe_upgrade
a= dkms build -m $MODULENAME -v $MODULEVERSION --rpm_safe_upgrade
a= dkms install -m $MODULENAME -v $MODULEVERSION --rpm_safe_upgrade
[ -n "$KERNELMANUAL" ] && DKMSOPTS="-k $KERNELVERSION --kernelsourcedir=$KERNSRC"
a= dkms uninstall $DKMSOPTS -m $MODULENAME -v $MODULEVERSION --rpm_safe_upgrade
a= dkms build $DKMSOPTS -m $MODULENAME -v $MODULEVERSION --rpm_safe_upgrade
a= dkms install $DKMSOPTS -m $MODULENAME -v $MODULEVERSION --rpm_safe_upgrade
}
# TODO: change it in the repo!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment