blob: 7afca310cb85f25361b9037fe78d6d2d1c9c09ca (
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
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=zfs
pkgver=0.8.2
pkgrel=1
pkgdesc="ZFS for Linux"
url="http://zfsonlinux.org"
arch="all !armhf !armv7"
license="CDDL-1.0"
provides="spl" # Mitigate upgrade conflicts
depends_dev="attr-dev e2fsprogs-dev glib-dev libtirpc-dev openssl-dev util-linux-dev"
makedepends="$depends_dev automake autoconf libtool linux-headers python3-dev py3-cffi"
options="!check" # need to be run on live system w/ ZFS loaded.
subpackages="$pkgname-dev $pkgname-doc $pkgname-openrc $pkgname-libs $pkgname-dracut::noarch
$pkgname-udev $pkgname-scripts $pkgname-utils-py:utils_py:noarch py3-pyzfs:pyzfs:noarch"
source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$pkgver/zfs-$pkgver.tar.gz"
prepare() {
default_prepare
autoreconf -vif
}
build() {
cd "$builddir"
export LIBS="$LIBS -lintl"
./configure --prefix=/usr \
--with-tirpc \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--with-config=user \
--with-udevdir=/lib/udev \
--disable-systemd \
--disable-static \
--with-python=3 \
--enable-pyzfs
make
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
rm -rf "$pkgdir"/usr/share/initramfs-tools
mv "$pkgdir"/usr/share/pkgconfig "$pkgdir"/usr/lib/
}
dracut() {
pkgdesc="$pkgdesc (dracut)"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/dracut "$subpkgdir"/usr/lib
}
udev() {
pkgdesc="$pkgdesc (udev)"
mkdir -p "$subpkgdir"/lib
mv "$pkgdir"/lib/udev "$subpkgdir"/lib
}
scripts() {
pkgdesc="$pkgdesc (scripts)"
mkdir -p "$subpkgdir"/usr/share
mv "$pkgdir"/usr/share/zfs "$subpkgdir"/usr/share
}
utils_py() {
pkgdesc="$pkgdesc (python utils)"
depends="python3"
mkdir -p "$subpkgdir"/usr/bin
local file
for file in arc_summary arcstat dbufstat; do
mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin
done
}
pyzfs() {
pkgdesc="$pkgdesc (Python lib to interact with ZFS)"
depends="python3 $pkgname"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib
}
sha512sums="1424b1a030b814f812b5da422100669db5b8c3ccae14c2fdd62a5e0df28e7255247fe5ca99c95a14f08c92cc1574c22dd132093e4a1dd81e38c95b10cc5e2496 zfs-0.8.2.tar.gz"
|