diff options
author | Markus Reichelt <slackbuilds@mareichelt.de> | 2023-05-08 18:56:45 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-05-13 19:27:04 +0700 |
commit | cb69fba0094516c7003ab422daafce4002c17861 (patch) | |
tree | 1867efd42775efb8aaaf64a0f8ce50fad109cffe /system | |
parent | b8c024c400d7b2ad559f8f73797cba600b6e0747 (diff) |
system/openzfs: Add dracut support.
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/openzfs/README | 5 | ||||
-rw-r--r-- | system/openzfs/openzfs.SlackBuild | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/system/openzfs/README b/system/openzfs/README index c69e3b65d7edc..d14fea174275c 100644 --- a/system/openzfs/README +++ b/system/openzfs/README @@ -7,4 +7,7 @@ This package is kernel dependent, so you'll need to recompile it for every new kernel you choose to run. Please use KERNEL environment variable if target kernel version differs -from that of the build machine, e.g. `export KERNEL=5.15.109`. +from that of the build machine, e.g. `export KERNEL=5.15.111`. + +Dracut support is compiled in if dracut is installed at the time of +building. diff --git a/system/openzfs/openzfs.SlackBuild b/system/openzfs/openzfs.SlackBuild index 76b6bd4b24b8e..125b25bb74d49 100644 --- a/system/openzfs/openzfs.SlackBuild +++ b/system/openzfs/openzfs.SlackBuild @@ -32,7 +32,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=openzfs SRCNAM=zfs VERSION=${VERSION:-2.1.11} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -73,6 +73,13 @@ else LIBDIRSUFFIX="" fi +# add support for dracut if installed +if [ -f /usr/bin/dracut ]; then + DRACUTLIBDIR="--with-dracutdir=/usr/lib${LIBDIRSUFFIX}/dracut" +else + DRACUTLIBDIR=""; +fi + set -e rm -rf $PKG @@ -105,6 +112,7 @@ CFLAGS="$SLKCFLAGS" \ --with-linux-obj="/lib/modules/${KERNEL}/source" \ --with-udevdir=/lib/udev \ --enable-static=no \ + $DRACUTLIBDIR \ --build=$ARCH-slackware-linux make @@ -115,7 +123,7 @@ rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la # clean up leftovers if [ "$ARCH" = "x86_64" ]; then rm -fr $PKG/usr/lib -else +elif [ -z "${DRACUTLIBDIR}" ]; then rm -fr $PKG/usr/lib/dracut fi rm -fr $PKG/usr/src |