blob: 22dc8bc0f106c9eea39908e42a4115e1ac9a5418 (
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
|
# Maintainer: Yurii Kolesnykov <root@yurikoles.com>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Iacopo Isimbaldi <isiachi@rhye.it>
# PRs are welcome: https://github.com/yurikoles-aur/zfs-dkms-git
pkgname=zfs-dkms-git
pkgver=2.1.99.r1271.g1c0c729ab4
pkgrel=1
epoch=2
pkgdesc='Kernel modules for the Zettabyte File System.'
arch=('x86_64')
url='https://zfsonlinux.org/'
license=('CDDL')
groups=('zfs-git')
depends=("zfs-utils-git=${epoch}:${pkgver}" 'dkms')
makedepends=('git')
provides=("ZFS-MODULE=${pkgver}" "SPL-MODULE=${pkgver}" "${pkgname%-git}=${pkgver}" 'spl-dkms')
conflicts=("${pkgname%-git}" 'spl-dkms')
replaces=('spl-dkms-git')
source=("git+https://github.com/zfsonlinux/zfs.git"
"0001-only-build-the-module-in-dkms.conf.patch")
sha256sums=('SKIP'
'539f325e56443554f9b87baff33948b91a280ec1daadcb0c636b105252fcd0f5')
b2sums=('SKIP'
'a8ab5da81d214e7801f0f8cdf77c076c714a3f17292df15ca35fcf7aef2c4d505348797e3b1da7590ea303ff488490ddba49e6f9e3f8a0bcc975894d51d97c2b')
pkgver() {
cd zfs
git describe --long | sed 's/^zfs-//;s/-rc/rc/;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd zfs
patch -p1 -i ../0001-only-build-the-module-in-dkms.conf.patch
# remove unneeded sections from module build
sed -ri "/AC_CONFIG_FILES/,/]\)/{
/AC_CONFIG_FILES/n
/]\)/n
/^\s*(module\/.*|zfs.release|Makefile)/!d
}" configure.ac
autoreconf -fi
}
build() {
cd zfs
./scripts/dkms.mkconf -n zfs -v ${pkgver} -f dkms.conf
# update metadata
./scripts/make_gitrev.sh
_meta_release=${pkgver#*.r}
sed -i -e "s/Release:[[:print:]]*/Release: ${_meta_release/./_}/" META
}
package() {
dkmsdir="${pkgdir}/usr/src/zfs-${pkgver}"
install -d "${dkmsdir}"
cp -a zfs/. "${dkmsdir}"
rm -rf "${dkmsdir}"/.git*
}
|