summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Isaac Yu <isaacyu1@isaacyu1.com>2023-04-27 20:30:59 -0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-29 17:20:33 +0700
commitdedbb45d13551a8655e659e0593d9b1e146d50fc (patch)
tree97cb5559ccebb3a010f6defc4cb6a97c7c29db47
parent236f45448a4e3efdb6f9d499dbfc0fdf7f43d878 (diff)
downloadslackbuilds-dedbb45d13551a8655e659e0593d9b1e146d50fc.tar.gz
slackbuilds-dedbb45d13551a8655e659e0593d9b1e146d50fc.tar.xz
system/vhba-module: Allow building with custom kernel versions
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/vhba-module/README4
-rw-r--r--system/vhba-module/doinst.sh3
-rw-r--r--system/vhba-module/vhba-module.SlackBuild4
3 files changed, 7 insertions, 4 deletions
diff --git a/system/vhba-module/README b/system/vhba-module/README
index 55c744cf79..5af5103d89 100644
--- a/system/vhba-module/README
+++ b/system/vhba-module/README
@@ -6,3 +6,7 @@ CD/DVD-ROM device emulator for linux.
NOTE:
The resulting package will be specific for the kernel it was built on.
+
+It is possible to build package for a different kernel version by
+setting the KERNEL variable as in:
+ KERNEL=5.15.94 ./vhba-module.SlackBuild
diff --git a/system/vhba-module/doinst.sh b/system/vhba-module/doinst.sh
index f61efdf685..766ff48186 100644
--- a/system/vhba-module/doinst.sh
+++ b/system/vhba-module/doinst.sh
@@ -1,2 +1 @@
-chroot . /sbin/depmod -a
-
+chroot . /sbin/depmod -a @KERNEL@
diff --git a/system/vhba-module/vhba-module.SlackBuild b/system/vhba-module/vhba-module.SlackBuild
index 42431011aa..8a138ce5f4 100644
--- a/system/vhba-module/vhba-module.SlackBuild
+++ b/system/vhba-module/vhba-module.SlackBuild
@@ -4,7 +4,7 @@
# Copyright 2008-2009 Heinz Wiesinger, Amsterdam, The Netherlands
# Copyright 2010-2012 Niels Horn, Rio de Janeiro, RJ, Brazil <niels.horn@gmail.com>
-# Copyright 2018-2022 Isaac Yu <isaacyu1@isaacyu1.com>
+# Copyright 2018-2023 Isaac Yu <isaacyu1@isaacyu1.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -84,7 +84,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+sed "s%@KERNEL@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_$PKGKERNEL-$SLKARCH-$BUILD$TAG.$PKGTYPE