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.
92 lines
3.1 KiB
92 lines
3.1 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="zfs-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
|
||
11 years ago
|
|
||
12 years ago
|
pkgdesc="Kernel modules for the Zettabyte File System."
|
||
11 years ago
|
depends=("spl=0.6.2_3.14-2" "zfs-utils" "linux=$LINUX_VERSION")
|
||
11 years ago
|
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/zfs/zfs-0.6.2.tar.gz
|
||
11 years ago
|
http://demizerone.com/patches/20140411-zfs-git-master.patch)
|
||
12 years ago
|
groups=("archzfs")
|
||
11 years ago
|
md5sums=('0b183b0abdd5be287046ad9ce4f899fd'
|
||
|
'b7632a5a80d474272d1de046b6da5f81')
|
||
12 years ago
|
license=("CDDL")
|
||
12 years ago
|
install=zfs.install
|
||
|
|
||
11 years ago
|
prepare() {
|
||
|
cd "$srcdir/zfs-0.6.2"
|
||
11 years ago
|
patch -Np1 < ../20140411-zfs-git-master.patch
|
||
11 years ago
|
}
|
||
|
|
||
12 years ago
|
build() {
|
||
12 years ago
|
cd "$srcdir/zfs-0.6.2"
|
||
12 years ago
|
./autogen.sh
|
||
11 years ago
|
if [[ $CARCH == "i686" ]]; then
|
||
|
./configure --prefix=/usr \
|
||
|
--sysconfdir=/etc \
|
||
|
--sbindir=/usr/bin \
|
||
|
--libdir=/usr/lib \
|
||
|
--datadir=/usr/share \
|
||
|
--includedir=/usr/include \
|
||
|
--with-udevdir=/lib/udev \
|
||
|
--libexecdir=/usr/lib/zfs-0.6.2 \
|
||
|
--with-config=kernel \
|
||
11 years ago
|
--with-linux=/usr/lib/modules/$MOD_BASENAME/build
|
||
11 years ago
|
else
|
||
|
./configure --prefix=/usr \
|
||
|
--sysconfdir=/etc \
|
||
|
--sbindir=/usr/bin \
|
||
|
--libdir=/usr/lib \
|
||
|
--datadir=/usr/share \
|
||
|
--includedir=/usr/include \
|
||
|
--with-udevdir=/lib/udev \
|
||
|
--libexecdir=/usr/lib/zfs-0.6.2 \
|
||
|
--with-config=kernel \
|
||
11 years ago
|
--with-linux=/usr/lib/modules/$MOD_BASENAME/build
|
||
11 years ago
|
fi
|
||
12 years ago
|
make
|
||
|
}
|
||
|
|
||
|
package() {
|
||
12 years ago
|
cd "$srcdir/zfs-0.6.2"
|
||
12 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
|
}
|