[Lunar-commits] <moonbase-other> zfs: _major_ cleanup/rewrite of the module
v4hn
me at v4hn.de
Thu Apr 25 02:54:13 CEST 2013
commit 4e5076752e5c901b2a85e0ebe078f64de76d99e8
Author: v4hn <me at v4hn.de>
Date: Wed, 24 Apr 2013 17:53:00 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/4e5076752e5c901b2a85e0ebe078f64de76d99e8
zfs: _major_ cleanup/rewrite of the module
We support more than one hook file for a reason...
Also it's not acceptable to have more than one SOURCE_DIRECTORY.
---
zbeta/zfs/BUILD | +17/-18
zbeta/zfs/DETAILS | +1/-0
zbeta/zfs/POST_INSTALL | +1/-0
zbeta/zfs/PRE_BUILD | +10/-0
4 files changed, 29 insertions(+), 18 deletions(-)
--- a/zbeta/zfs/BUILD
+++ b/zbeta/zfs/BUILD
@@ -1,24 +1,23 @@
-SPLDIR=$BUILD_DIRECTORY/spl-$VERSION
-
-cd $BUILD_DIRECTORY && unpack $SOURCE2 &&
-cd $SPLDIR &&
+cd "$SPL_PATH" &&
default_config &&
make ${MAKES:+-j${MAKES}} &&
-cd $SOURCE_DIRECTORY &&
-OPTS="$OPTS --with-spl=$SPLDIR" default_config &&
+
+cd "$ZFS_PATH" &&
+OPTS+=" --with-spl=$SPL_PATH" default_config &&
make ${MAKES:+-j${MAKES}} &&
+
prepare_install &&
-cd $SPLDIR &&
-mkdir pkg &&
-# SPL and ZFS try to install files on top of themselves and fail, so do
+# SPL and ZFS try to install files on top of each other and fail, so do
# this hack to work around it.
-make install DESTDIR=$(cd pkg; pwd) &&
-cd pkg &&
-tar cf - . | ( cd /; tar xf - ) &&
-cd $SOURCE_DIRECTORY &&
-mkdir pkg &&
-make install DESTDIR=$(cd pkg; pwd) &&
-cd pkg && tar cf - . | (cd /;tar xf -) &&
-depmod -a &&
-rm -rf $SPLDIR
+cd "$SPL_PATH" &&
+mkdir -p pkg &&
+make install DESTDIR="$SPL_PATH/pkg" &&
+cd "$SPL_PATH/pkg" &&
+cp -av * / &&
+
+cd "$ZFS_PATH" &&
+mkdir -p pkg &&
+make install DESTDIR="$ZFS_PATH/pkg" &&
+cd "$ZFS_PATH/pkg" &&
+cp -av * /
--- a/zbeta/zfs/DETAILS
+++ b/zbeta/zfs/DETAILS
@@ -2,6 +2,7 @@
VERSION=0.6.1
SOURCE=$MODULE-$VERSION.tar.gz
SOURCE2=spl-$VERSION.tar.gz
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE
SOURCE_URL=http://archive.zfsonlinux.org/downloads/zfsonlinux/$MODULE/
SOURCE2_URL=http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/
SOURCE_VFY=sha1:5c465e21e106ea3329c943802c0bf145b3b8f939
--- /dev/null
+++ b/zbeta/zfs/POST_INSTALL
@@ -0,0 +1 @@
+depmod -a
--- /dev/null
+++ b/zbeta/zfs/PRE_BUILD
@@ -0,0 +1,10 @@
+BASE="$BUILD_DIRECTORY/$MODULE" &&
+mkdir -p "$BASE" &&
+cd "$BASE" &&
+
+unpack "$SOURCE" &&
+unpack "$SOURCE2" &&
+ZFS_PATH="$SOURCE_DIRECTORY/${SOURCE%.tar.gz}" &&
+SPL_PATH="$SOURCE_DIRECTORY/${SOURCE2%.tar.gz}" &&
+
+sedit "s:/bin/cp:/usr/bin/cp:" {$ZFS_PATH,$SPL_PATH}/module/Makefile.in
More information about the Lunar-commits
mailing list