summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/spl-solaris/README8
-rw-r--r--system/spl-solaris/spl-solaris.SlackBuild8
2 files changed, 7 insertions, 9 deletions
diff --git a/system/spl-solaris/README b/system/spl-solaris/README
index cde5bc628d..f08d1afbf1 100644
--- a/system/spl-solaris/README
+++ b/system/spl-solaris/README
@@ -14,8 +14,6 @@ NOTE: You'll need the kernel source code to be able to compile this.
This package is kernel dependent, so you'll need to recompile it for
every new kernel you choose to run.
-If you don't have a /usr/src/linux symlink pointing to your real
-kernel directory (the script looks for it there by default), specify
-your kernel source destination by
-
- LINUXPATH=<path to your kernel source> ./spl-solaris.SlackBuild
+If you're building this for a kernel that isn't currently running,
+you'll need to pass what that kernel's 'uname -a' output will be
+to the KERN variable when running the script, e.g. KERN=4.14.9
diff --git a/system/spl-solaris/spl-solaris.SlackBuild b/system/spl-solaris/spl-solaris.SlackBuild
index 913591745d..f5e8a3eb25 100644
--- a/system/spl-solaris/spl-solaris.SlackBuild
+++ b/system/spl-solaris/spl-solaris.SlackBuild
@@ -31,8 +31,8 @@ SRCNAM=spl
VERSION=${VERSION:-0.7.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-LINUXPATH=${LINUXPATH:-/usr/src/linux}
-KERN=$(cut -d '"' -f2 $LINUXPATH/include/generated/utsrelease.h | tr - _)
+
+KERN=${KERN:-"$(uname -r)"}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -85,8 +85,8 @@ CFLAGS="$SLKCFLAGS" \
--includedir=/usr/include \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
- --with-linux=$LINUXPATH \
- --with-linux-obj=$LINUXPATH \
+ --with-linux="/lib/modules/${KERN}/source" \
+ --with-linux-obj="/lib/modules/${KERN}/source" \
--build=$ARCH-slackware-linux
make