system/openrazer-kernel: Allow building for $KERNEL.

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andrew Clemons 2022-05-16 09:31:07 +12:00 committed by Willy Sudiarto Raharjo
parent 6f958f23e2
commit cf9c38ee0c
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 2 additions and 2 deletions

View File

@ -85,11 +85,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
make setup_dkms DESTDIR=$PKG
make setup_dkms DESTDIR=$PKG KERNELDIR=/lib/modules/$KERNEL/build MODULEDIR=/lib/modules/$KERNEL/kernel/drivers/hid
# Build and install kernel modules
mkdir -p $PKG/lib/modules/$KERNEL/kernel/drivers/hid
make -C $PKG/usr/src/$SRCNAM-driver-$VERSION
make -C $PKG/usr/src/$SRCNAM-driver-$VERSION KERNELDIR=/lib/modules/$KERNEL/build MODULEDIR=/lib/modules/$KERNEL/kernel/drivers/hid
install -m 0664 $PKG/usr/src/$SRCNAM-driver-$VERSION/driver/*.ko $PKG/lib/modules/$KERNEL/kernel/drivers/hid
# Once the modules are built, we don't need to keep the dkms stuff.