summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD49
-rw-r--r--spl.install31
4 files changed, 109 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f5881fb9e36a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+# Generated by mksrcinfo v8
+# Thu Apr 21 08:37:18 UTC 2016
+pkgbase = spl-linux-git
+ pkgdesc = Solaris Porting Layer kernel modules.
+ pkgver = 0.6.5_r49_g224817e_4.5.1_1
+ pkgrel = 1
+ url = http://zfsonlinux.org/
+ install = spl.install
+ arch = x86_64
+ groups = archzfs-linux-git
+ license = GPL
+ makedepends = git
+ depends = spl-utils-linux-git
+ depends = kmod
+ depends = linux>=4.5.1
+ depends = linux<4.6
+ depends = linux-headers>=4.5.1
+ depends = linux-headers<4.6
+ provides = spl-linux-git
+ source = git+https://github.com/zfsonlinux/spl.git
+ sha256sums = SKIP
+
+pkgname = spl-linux-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..2739fcdc4659
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.tar.xz
+*.tar.gz
+*.sig
+*.log
+spl/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..46ac812d4657
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Jesus Alvarez <jeezusjr at gmail dot com>
+#
+# This PKGBUILD was generated by the archzfs build scripts located at
+#
+# http://github.com/archzfs/archzfs
+#
+# ! WARNING !
+#
+# The archzfs packages are kernel modules, so these PKGBUILDS will only work with the kernel package they target. In this
+# case, the archzfs-linux packages will only work with the default package! To have a single PKGBUILD target many kernels
+# would make for a cluttered PKGBUILD!
+#
+# If you have a custom kernel, you will need to change things in the PKGBUILDS. If you would like to have AUR or archzfs repo
+# packages for your favorite kernel package built using the archzfs build tools, submit a request in the Issue tracker on the
+# archzfs github page.
+#
+pkgname="spl-linux-git"
+pkgver=0.6.5_r49_g224817e_4.5.1_1
+pkgrel=1
+pkgdesc="Solaris Porting Layer kernel modules."
+depends=("spl-utils-linux-git" "kmod"
+ "linux>=4.5.1" "linux<4.6"
+ "linux-headers>=4.5.1" "linux-headers<4.6")
+arch=("x86_64")
+url="http://zfsonlinux.org/"
+source=("git+https://github.com/zfsonlinux/spl.git")
+sha256sums=("SKIP")
+groups=("archzfs-linux-git")
+license=("GPL")
+install=spl.install
+provides=("spl-linux-git")
+makedepends=("git")
+
+build() {
+ cd "${srcdir}/spl"
+ ./autogen.sh
+ ./configure --prefix=/usr --libdir=/usr/lib --sbindir=/usr/bin \
+ --with-linux=/usr/lib/modules/4.5.1-1-ARCH/build \
+ --with-config=kernel
+ make
+}
+
+package() {
+ cd "${srcdir}/spl"
+ make DESTDIR="${pkgdir}" install
+ mv "${pkgdir}/lib" "${pkgdir}/usr/"
+ # Remove reference to ${srcdir}
+ sed -i "s+${srcdir}++" ${pkgdir}/usr/src/spl-*/4.5.1-1-ARCH/Module.symvers
+}
diff --git a/spl.install b/spl.install
new file mode 100644
index 000000000000..930317d6be20
--- /dev/null
+++ b/spl.install
@@ -0,0 +1,31 @@
+post_install() {
+ check_hostid
+ run_depmod
+}
+
+post_remove() {
+ run_depmod
+}
+
+post_upgrade() {
+ check_hostid
+ run_depmod
+}
+
+check_hostid() {
+ # Check /etc/hostid to see if it set to the sentinel value, see
+ # https://wiki.archlinux.org/index.php/ZFS for more information.
+ HOSTID=$(hostid)
+ if [ "0x${HOSTID}" == "0xffffffff" ]; then
+ # Generate a new hostid
+ : >/etc/hostid
+ HOSTID=$(hostid)
+ # hostid is 4 byte little endian
+ printf $(echo -n $HOSTID | sed 's/\(..\)\(..\)\(..\)\(..\)/\x\4\x\3\x\2\x\1/') >/etc/hostid
+ fi
+}
+
+run_depmod() {
+ echo ">>> Updating SPL module dependencies"
+ depmod 4.5.1-1-ARCH
+}