summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Robby Workman2017-12-29 10:53:35 +0100
committer Willy Sudiarto Raharjo2018-01-06 00:56:01 +0100
commit25b4599354f1c6328a8e0af43a95a54d1227467b (patch)
tree3099b6067490743ba5adad8cb9e0f9baa978fd41
parent0e436da449a2942ab9b808c3bf775dc47a647dd7 (diff)
downloadslackbuilds-25b4599354f1c6328a8e0af43a95a54d1227467b.tar.gz
system/spl-solaris: Use /lib/modules/${KERN}/source
This requires passing KERN=whatever if building for a non-currently-running kernel. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-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