aboutsummaryrefslogtreecommitdiffstats
path: root/main/zfs/APKBUILD
blob: e7e6590fa5476bc1a0ec875c6001e64f0091fcab (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

pkgname=zfs
pkgver=0.7.1
pkgrel=0
pkgdesc="ZFS for Linux"
url="http://zfsonlinux.org"
arch="all !armhf !ppc64le"
license="CDDL"
depends=""
depends_dev="glib-dev e2fsprogs-dev util-linux-dev libtirpc-dev attr-dev"
makedepends="$depends_dev automake autoconf libtool linux-headers"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-dracut
	$pkgname-udev $pkgname-scripts $pkgname-utils-py:utils_py"
source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$pkgver/zfs-$pkgver.tar.gz
	"


builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	autoreconf -vif || return 1
}

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 \
		|| return 1
	make || return 1
}

package() {
        cd "$builddir"
        make DESTDIR="$pkgdir" install || return 1
	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 || return 1
}

udev() {
	pkgdesc="$pkgdesc (udev)"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/udev \
		"$subpkgdir"/lib || return 1
}

scripts() {
	pkgdesc="$pkgdesc (scripts)"
	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/zfs \
		"$subpkgdir"/usr/share || return 1
}

utils_py() {
	pkgdesc="$pkgdesc (python utils)"
	depends="python2"
	mkdir -p "$subpkgdir"/usr/bin
	for i in "$pkgdir"/usr/bin/*.py; do
		mv $i "$subpkgdir"/usr/bin || return 1
	done
}

sha512sums="64b0a3b5eeaf09ce824e3e029880a8e5dcb3e4567d1fb2fa24c89d8e55fee1ebe2d2f3a9f77d5468cc5637074e27d5ba7696b566829c93fd69c610b288200a37  zfs-0.7.1.tar.gz"