From 25b4599354f1c6328a8e0af43a95a54d1227467b Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Fri, 29 Dec 2017 03:53:35 -0600 Subject: 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 --- system/spl-solaris/README | 8 +++----- system/spl-solaris/spl-solaris.SlackBuild | 8 ++++---- 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= ./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 -- cgit v1.2.3