blob: 3db921aaff92dafc63d15824c44f1fbbd314bd20 (
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
_flavor=${FLAVOR:-grsec}
_realname=zfs
_name=$_realname-$_flavor
_kpkg=linux-$_flavor
_kver=4.1.15
_kpkgrel=2
_realver=0.6.5
_mypkgrel=0
# source the kernel version
if [ -f ../../main/linux-$_flavor/APKBUILD ]; then
. ../../main/linux-$_flavor/APKBUILD
[ "$_kver" != "$pkgver" ] && die "$_name: Please update _kver to $pkgver"
[ "$_kpkgrel" != "$pkgrel" ] && die "$_name: Please update _kpkgrel to $pkgrel"
fi
_kernelver=$_kver-r$_kpkgrel
_abi_release=${_kver}-${_kpkgrel}-${_flavor}
pkgname=$_name
pkgver=$_kver
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="ZFS for Linux"
url="http://zfsonlinux.org"
arch="x86 x86_64"
license="CDDL"
depends="spl-$_flavor"
depends_dev="glib-dev e2fsprogs-dev util-linux-dev libtirpc-dev
linux-$_flavor-dev=$_kernelver spl-$_flavor-dev"
makedepends="$depends_dev automake autoconf libtool linux-headers"
install=""
subpackages="$pkgname-dev $pkgname-doc zfs-utils:utils"
source="http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/zfs-$_realver.tar.gz
musl-fixes.patch
"
_builddir="$srcdir/$_realname-$_realver"
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
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=all \
--with-udevdir=/lib/udev \
--with-linux=/usr/src/linux-headers-${_abi_release} \
--with-spl=/usr/src/spl-${_realver} \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
rm -rf "$pkgdir"/usr/libexec
rm -rf "$pkgdir"/usr/share/dracut
}
dev() {
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/src \
"$subpkgdir"/usr || return 1
default_dev
}
utils() {
pkgdesc="Userland tools to manage zfs on linux"
depends="bash"
mkdir -p "$subpkgdir"
mv "$pkgdir"/* "$subpkgdir" || return 1
mkdir -p "$pkgdir"/lib
mv "$subpkgdir"/lib/modules \
"$pkgdir"/lib || return 1
}
md5sums="76a3675a56acce7c9fd36578173304e4 zfs-0.6.5.tar.gz
68b420d0dd707921701d3d2c9544df90 musl-fixes.patch"
sha256sums="b38e9c04e9e7e1930adbc16b694f2401812e7674ae3bb526098a2a7c6435534d zfs-0.6.5.tar.gz
bc4ccb90eb93de774f5d935b3ea734e11be617faa78be76d6ecebcbe8b61524f musl-fixes.patch"
sha512sums="e6749ebfb8aefc31ec88ab7de5224e7148daa883ea2beed1c9b38e98ec7495da6fb62fc1b6a393fdb168ca5eb204b1bb940f13af6ed9e80fdd5c39436856295c zfs-0.6.5.tar.gz
aff25fd556911d64ac426fc15fd16dd1a49f55d90936607d5093bdc70970b3cf5559a1b0c531b15a64c48ad540986ed0a6ee3c5260984b9c3b4a1ca3911d9143 musl-fixes.patch"
|