mirror of https://github.com/archzfs/archzfs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.6 KiB
78 lines
2.6 KiB
12 years ago
|
# Maintainer: Jesus Alvarez <jeezusjr at gmail dot com>
|
||
|
# Contributor: Kyle Fuller <inbox at kylefuller dot co dot uk>
|
||
|
|
||
11 years ago
|
pkgname="spl-git"
|
||
11 years ago
|
#
|
||
|
# 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
|
||
|
#
|
||
11 years ago
|
pkgver=0.6.2_3.14
|
||
11 years ago
|
pkgrel=2
|
||
11 years ago
|
|
||
11 years ago
|
# 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.
|
||
11 years ago
|
LINUX_VERSION_X32="3.14-4"
|
||
|
LINUX_VERSION_X64="3.14-4"
|
||
11 years ago
|
[[ $CARCH == "i686" ]] && LINUX_VERSION=$LINUX_VERSION_X32 || LINUX_VERSION=$LINUX_VERSION_X64
|
||
11 years ago
|
|
||
11 years ago
|
# If LINUX_VERSION does not have a minor version, we need to add "0" as the
|
||
|
# minor version for the kernel module path. Kernel modules for linux versions
|
||
|
# with no minor version (i.e. 3.14) are kept in /usr/lib/modules/3.14.0-4-ARCH
|
||
|
[[ $LINUX_VERSION =~ ^[:digit:]+\.[:digit:]+\.([:digit:]+)\-[:digit:]+ ]]
|
||
|
if [[ ${BASH_REMATCH[1]} == "" ]]; then
|
||
|
[[ $LINUX_VERSION =~ ^([[:digit:]\.]+)\-([[:digit:]]+) ]] &&
|
||
|
MOD_LINUX_VERSION=${BASH_REMATCH[1]};
|
||
|
MOD_LINUX_PKGREL=${BASH_REMATCH[2]}
|
||
|
MOD_BASENAME=${MOD_LINUX_VERSION}.0-$MOD_LINUX_PKGREL-ARCH
|
||
|
else
|
||
|
MOD_BASENAME=$LINUX_VERSION-ARCH
|
||
|
fi
|
||
|
|
||
12 years ago
|
pkgdesc="Solaris Porting Layer kernel modules."
|
||
11 years ago
|
depends=("spl-utils" "linux=$LINUX_VERSION")
|
||
|
makedepends=("linux-headers=$LINUX_VERSION")
|
||
12 years ago
|
arch=("i686" "x86_64")
|
||
|
url="http://zfsonlinux.org/"
|
||
11 years ago
|
source=(http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/spl-0.6.2.tar.gz
|
||
11 years ago
|
20140411-git-master.patch)
|
||
12 years ago
|
groups=("archzfs")
|
||
11 years ago
|
md5sums=('f00535bf89a7fde0e08f44a14a1f1e03'
|
||
11 years ago
|
'5393794838f95061ccd10dca2553bbf5')
|
||
12 years ago
|
license=("GPL")
|
||
12 years ago
|
install=spl.install
|
||
|
|
||
11 years ago
|
prepare() {
|
||
|
cd "$srcdir/spl-0.6.2"
|
||
11 years ago
|
patch -Np1 < ../20140411-git-master.patch
|
||
11 years ago
|
}
|
||
|
|
||
12 years ago
|
build() {
|
||
12 years ago
|
cd "$srcdir/spl-0.6.2"
|
||
12 years ago
|
./autogen.sh
|
||
12 years ago
|
if [[ $CARCH == "i686" ]]; then
|
||
12 years ago
|
./configure --prefix=/usr --libdir=/usr/lib --sbindir=/usr/bin \
|
||
11 years ago
|
--with-linux=/usr/lib/modules/$MOD_BASENAME/build \
|
||
12 years ago
|
--with-config=kernel --enable-atomic-spinlocks
|
||
|
else
|
||
12 years ago
|
./configure --prefix=/usr --libdir=/usr/lib --sbindir=/usr/bin \
|
||
11 years ago
|
--with-linux=/usr/lib/modules/$MOD_BASENAME/build \
|
||
12 years ago
|
--with-config=kernel
|
||
|
fi
|
||
12 years ago
|
make
|
||
|
}
|
||
|
|
||
|
package() {
|
||
12 years ago
|
cd "$srcdir/spl-0.6.2"
|
||
11 years ago
|
make DESTDIR="$pkgdir" install
|
||
12 years ago
|
|
||
|
# move module tree /lib -> /usr/lib
|
||
11 years ago
|
cp -r "$pkgdir"/{lib,usr}
|
||
|
rm -r "$pkgdir"/lib
|
||
12 years ago
|
}
|