# Maintainer: Jesus Alvarez # Contributor: Kyle Fuller pkgname="spl" # # This script doesn't use bash variables for the version number because AUR # doesn't properly parse bash variables. We use a custom build script to # automatically change the appropriate variables before building in a clean # chroot environment (using systemd-ndspawn). # # The build script can be found at # https://github.com/demizer/archzfs/blob/master/build.sh # pkgver=0.6.2_3.13.7 pkgrel=3 # Used incase the i686 and x86_64 linux packages get out of sync with the # PKGREL. This occurred on January 31, 2014 where i686 was versioned at # 3.12.9-1 and x86_64 was versioned at 3.12.9-2. LINUX_VERSION_X32="3.13.7-1" LINUX_VERSION_X64="3.13.7-1" [[ $CARCH == "i686" ]] && LINUX_VERSION=$LINUX_VERSION_X32 || LINUX_VERSION=$LINUX_VERSION_X64 pkgdesc="Solaris Porting Layer kernel modules." depends=("spl-utils" "linux=$LINUX_VERSION") makedepends=("linux-headers=$LINUX_VERSION") arch=("i686" "x86_64") url="http://zfsonlinux.org/" source=(http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/spl-0.6.2.tar.gz linux-3.12-compat-shrinker-api.patch linux-3.13-compat-remove-unused-flags.patch linux-3.13-compat-inode-argument.patch) groups=("archzfs") md5sums=('f00535bf89a7fde0e08f44a14a1f1e03' '4d30dbda61995e77c5ca976abb80bad6' '98081399cdad56e84be109ba68ef9213' 'ad9a409db6ee851c4ff381beaf4bd33a') license=("GPL") install=spl.install prepare() { cd "$srcdir/spl-0.6.2" patch -Np1 < ../linux-3.12-compat-shrinker-api.patch patch -Np1 < ../linux-3.13-compat-inode-argument.patch patch -Np1 < ../linux-3.13-compat-remove-unused-flags.patch } build() { cd "$srcdir/spl-0.6.2" ./autogen.sh if [[ $CARCH == "i686" ]]; then ./configure --prefix=/usr --libdir=/usr/lib --sbindir=/usr/bin \ --with-linux=/usr/lib/modules/$LINUX_VERSION_X32-ARCH/build \ --with-config=kernel --enable-atomic-spinlocks else ./configure --prefix=/usr --libdir=/usr/lib --sbindir=/usr/bin \ --with-linux=/usr/lib/modules/$LINUX_VERSION_X64-ARCH/build \ --with-config=kernel fi make } package() { cd "$srcdir/spl-0.6.2" make DESTDIR="$pkgdir" install # move module tree /lib -> /usr/lib cp -r "$pkgdir"/{lib,usr} rm -r "$pkgdir"/lib }