summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 43a7089114bce60fe80da10beebaf92059ff2810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Maintainer: Jesus Alvarez <jeezusjr at gmail dot com>
# Contributor: Kyle Fuller <inbox at kylefuller dot co dot uk>
#
# This PKGBUILD was generated by the archzfs build scripts located at
#
# http://github.com/demizer/archzfs
#
# The build script generates and updates the pkgver and _kernel* variables.
#
pkgname="zfs-git"
pkgver=0.6.5.3_r0_g9aaf60b_4.2.3_1
pkgrel=1
license=('CDDL')

# 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.
_kernel_version_x32="4.2.3-1"
_kernel_version_x32_full="4.2.3-1"
_kernel_version_x64="4.2.3-1"
_kernel_version_x64_full="4.2.3-1"

if [[ $CARCH == "i686" ]]; then
    _kernel_version=${_kernel_version_x32}
    _kernel_version_full=${_kernel_version_x32_full}
else
    _kernel_version=${_kernel_version_x64}
    _kernel_version_full=${_kernel_version_x64_full}
fi

pkgdesc="Kernel modules for the Zettabyte File System."
depends=("spl-git" "zfs-utils-git" "linux=${_kernel_version}")
makedepends=("git" "linux-headers=${_kernel_version}")
arch=("i686" "x86_64")
url="http://zfsonlinux.org/"
source=("git+https://github.com/zfsonlinux/zfs.git#commit=9aaf60b6")
groups=("archzfs-git")
md5sums=('SKIP')
replaces=("zfs")
provides=("zfs")
conflicts=("zfs" "zfs-lts")
install=zfs.install

build() {
    cd "${srcdir}/zfs"
    ./autogen.sh

    ./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 \
                --with-config=kernel \
                --with-linux=/usr/lib/modules/${_kernel_version_full}-ARCH/build

    make
}

package() {
    cd "${srcdir}/zfs"
    make DESTDIR="${pkgdir}" install

    cp -r "$pkgdir"/{lib,usr}
    rm -r "$pkgdir"/lib

    sed -i "s+${srcdir}++" ${pkgdir}/usr/src/zfs-*/${_kernel_version_full}-ARCH/Module.symvers
}