- zfs 0.6.0-rc11, spl 0.6.0-rc11
This commit is contained in:
39
pkgs/os-specific/linux/spl/default.nix
Normal file
39
pkgs/os-specific/linux/spl/default.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ stdenv, fetchurl, kernel, perl, autoconf, automake, libtool, coreutils, gawk }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "spl-0.6.0-rc11";
|
||||
src = fetchurl {
|
||||
url = http://github.com/downloads/zfsonlinux/spl/spl-0.6.0-rc11.tar.gz;
|
||||
sha256 = "0brsrr9hvzlpx7a26nn8rw9k2kh9s75hmxp6h087hi64hzxysf8g";
|
||||
};
|
||||
|
||||
patches = [ ./install_prefix.patch ./install_prefix_2.patch ./module_prefix.patch ];
|
||||
|
||||
buildInputs = [ perl kernel autoconf automake libtool ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I${kernel}/lib/modules/${kernel.modDirVersion}/build/include/generated";
|
||||
|
||||
preConfigure = ''
|
||||
./autogen.sh
|
||||
|
||||
substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid
|
||||
substituteInPlace ./module/spl/spl-module.c --replace /bin/mknod mknod
|
||||
|
||||
substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin"
|
||||
substituteInPlace ./module/spl/spl-module.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
|
||||
substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
|
||||
'';
|
||||
|
||||
configureFlags = ''
|
||||
--with-linux=${kernel}/lib/modules/${kernel.version}/build
|
||||
--with-linux-obj=${kernel}/lib/modules/${kernel.version}/build
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)";
|
||||
homepage = http://zfsonlinux.org/;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = stdenv.lib.licenses.cddl;
|
||||
maintainers = with stdenv.lib.maintainers; [ jcumming ];
|
||||
};
|
||||
}
|
||||
19
pkgs/os-specific/linux/spl/install_prefix.patch
Normal file
19
pkgs/os-specific/linux/spl/install_prefix.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
*** spl-0.6.0-rc10/Makefile.am.old Fri Aug 17 14:49:16 2012
|
||||
--- spl-0.6.0-rc10/Makefile.am Fri Aug 17 14:51:06 2012
|
||||
***************
|
||||
*** 32,38 ****
|
||||
if CONFIG_KERNEL
|
||||
install-data-local:
|
||||
release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
|
||||
! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \
|
||||
for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
|
||||
$(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
||||
done
|
||||
--- 32,38 ----
|
||||
if CONFIG_KERNEL
|
||||
install-data-local:
|
||||
release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
|
||||
! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \
|
||||
for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
|
||||
$(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
||||
done
|
||||
32
pkgs/os-specific/linux/spl/install_prefix_2.patch
Normal file
32
pkgs/os-specific/linux/spl/install_prefix_2.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
*** git-export/include/Makefile.am Tue Mar 6 00:05:28 2012
|
||||
--- git-export/include/Makefile.am.new Tue Mar 6 00:04:46 2012
|
||||
***************
|
||||
*** 16,22 ****
|
||||
|
||||
install-data-local:
|
||||
release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
|
||||
! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \
|
||||
instfiles=`find . -name '*.h'`; \
|
||||
for instfile in $$instfiles; do \
|
||||
$(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
||||
--- 16,22 ----
|
||||
|
||||
install-data-local:
|
||||
release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
|
||||
! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \
|
||||
instfiles=`find . -name '*.h'`; \
|
||||
for instfile in $$instfiles; do \
|
||||
$(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
||||
***************
|
||||
*** 24,28 ****
|
||||
|
||||
uninstall-local:
|
||||
release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
|
||||
! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \
|
||||
$(RM) -R $$instdest
|
||||
--- 24,28 ----
|
||||
|
||||
uninstall-local:
|
||||
release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
|
||||
! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \
|
||||
$(RM) -R $$instdest
|
||||
33
pkgs/os-specific/linux/spl/module_prefix.patch
Normal file
33
pkgs/os-specific/linux/spl/module_prefix.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
*** git-export/module/Makefile.in Wed Dec 31 16:00:01 1969
|
||||
--- git-export/module/Makefile.in.new Sat Jan 28 21:42:06 2012
|
||||
***************
|
||||
*** 17,30 ****
|
||||
modules_install:
|
||||
@# Install the kernel modules
|
||||
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
|
||||
! INSTALL_MOD_PATH=$(DESTDIR) \
|
||||
INSTALL_MOD_DIR=addon/spl $@
|
||||
@# Remove extraneous build products when packaging
|
||||
! if [ -n "$(DESTDIR)" ]; then \
|
||||
! find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \
|
||||
-name 'modules.*' | xargs $(RM); \
|
||||
fi
|
||||
! sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \
|
||||
if [ -f $$sysmap ]; then \
|
||||
depmod -ae -F $$sysmap @LINUX_VERSION@; \
|
||||
fi
|
||||
--- 17,30 ----
|
||||
modules_install:
|
||||
@# Install the kernel modules
|
||||
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
|
||||
! INSTALL_MOD_PATH=@prefix@ \
|
||||
INSTALL_MOD_DIR=addon/spl $@
|
||||
@# Remove extraneous build products when packaging
|
||||
! if [ -n "@prefix@" ]; then \
|
||||
! find @prefix@/lib/modules/@LINUX_VERSION@ \
|
||||
-name 'modules.*' | xargs $(RM); \
|
||||
fi
|
||||
! sysmap=@prefix@/boot/System.map-@LINUX_VERSION@; \
|
||||
if [ -f $$sysmap ]; then \
|
||||
depmod -ae -F $$sysmap @LINUX_VERSION@; \
|
||||
fi
|
||||
24
pkgs/os-specific/linux/spl/spl-0.6.0.nix
Normal file
24
pkgs/os-specific/linux/spl/spl-0.6.0.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ stdenv, fetchgit, kernel, linuxHeaders, perl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "spl-0.6.0-rc4";
|
||||
src = fetchgit {
|
||||
url = git://github.com/behlendorf/spl.git;
|
||||
rev = "dde6b7b137f56894a457";
|
||||
sha256 = "c402517a647de0c22a69588219aa214f96d1cf9d2f8751b99c5a2795898c726b";
|
||||
};
|
||||
|
||||
patches = [ ./install_prefix.patch ./module_prefix.patch ];
|
||||
|
||||
buildInputs = [ perl kernel linuxHeaders ];
|
||||
|
||||
configureFlags = [ "--with-linux=${kernel}/lib/modules/${kernel.version}/build"
|
||||
"--with-linux-obj=${kernel}/lib/modules/${kernel.version}/build" ];
|
||||
|
||||
meta = {
|
||||
description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)";
|
||||
homepage = http://zfsonlinux.org/;
|
||||
license = "CDDL";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user