# Contributor: Carlo Landmeter # Maintainer: _flavor=${FLAVOR:-grsec} _realname=zfs _name=$_realname-$_flavor _kpkg=linux-$_flavor _kver=4.4.8 _kpkgrel=1 _realver=0.6.5.6 _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 0001-Add-support-for-alpine-linux.patch 0001-Add-missing-fcntl.h-to-includes-in-mount_zfs.c.patch 0002-Add-support-for-libtirpc.patch 0003-Use-the-correct-macro-to-include-backtrace.patch 0004-Ensure-correct-return-value-type.patch 0006-Include-sys-types.h-in-devid.h.patch 0008-Set-_DATE_FMT-to-if-not-defined-in-libspl-timestamp..patch 468e0c54b8d34d93043c9631cab954fb88fff8cb.patch 3bca72de3c30598c585c910208459a0cf05b9f0d.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="8c05b3cfcb0c25b1469032404ec032fe zfs-0.6.5.6.tar.gz ce98b83e44621e99e686cb384b36aaeb 0001-Add-support-for-alpine-linux.patch 7b4ee1de2404c0baa9848de309819fc9 0001-Add-missing-fcntl.h-to-includes-in-mount_zfs.c.patch 8633a50fa103f91b7c08cba35c38fffd 0002-Add-support-for-libtirpc.patch 51f8e000510747abc1610779820c90e2 0003-Use-the-correct-macro-to-include-backtrace.patch f380fed6034db74b1b1d80d717e51ad2 0004-Ensure-correct-return-value-type.patch 3853a26f7a7a14607c99020373c9691e 0006-Include-sys-types.h-in-devid.h.patch 5050558e710d4c763dc4dddcad89b153 0008-Set-_DATE_FMT-to-if-not-defined-in-libspl-timestamp..patch 6388b1fbd8a335db158b8c84d023c8a2 468e0c54b8d34d93043c9631cab954fb88fff8cb.patch 7522a01aa31d474fe148945dd4de5329 3bca72de3c30598c585c910208459a0cf05b9f0d.patch" sha256sums="c349d46d86b4f61cd53a0891acad916cfc3f0d6754127db7f60a0bd98185aeff zfs-0.6.5.6.tar.gz f06e42db7c7e41481dfb068d80c9b763d7c9aead4c8f017e9398f88d58424092 0001-Add-support-for-alpine-linux.patch 2166987d985fc1e9058943e75642177178a2c140d3a261a97378696205f0d77d 0001-Add-missing-fcntl.h-to-includes-in-mount_zfs.c.patch 88535d0c974ac7d878958dc835f27a5d1090a3cb0c90234f5f1cede65f7fdc83 0002-Add-support-for-libtirpc.patch 3ee3d49a5f6ed0df37cdbe60330ee4ff9e6feb9ac0872250482ddfc039617eef 0003-Use-the-correct-macro-to-include-backtrace.patch 03695ab8313cf4e30289bdfa9a611f7538ce712253e7163de755fbe2fed9d1d8 0004-Ensure-correct-return-value-type.patch 7d26389c31c2720fde8865fee8a1613a92d264a3a3c8aec5f9dea4426f19221d 0006-Include-sys-types.h-in-devid.h.patch 2c8bda14b9de33ccae073c3738fc76136818fc60702c96a03229b210b6985d6b 0008-Set-_DATE_FMT-to-if-not-defined-in-libspl-timestamp..patch c8e2d08023fbd7c754fda6432f663fd04a8b4f4a96d7d83fb5575bbffe8ca7b8 468e0c54b8d34d93043c9631cab954fb88fff8cb.patch d372afa34cc4a76de326788c5017a9f5741511f3760b64f207991d80788e5605 3bca72de3c30598c585c910208459a0cf05b9f0d.patch" sha512sums="94c55a50f0f9a90ce07a45dc72bb2730b2a41373ab5a12845df00ef38bb22e4a80ab2fb6e31a9c3a45e51516cdea441bb9da1d0acf71f2f88b38c7c3e9e995b0 zfs-0.6.5.6.tar.gz d2efb627f493bab06f8049dc4bcb7c39269ff9dcd66879a0f96fa5040e1c7468f9e684277ec3e54841b3a5f8734d9470f2c6a1af470e3f1a71f759f9155b7ede 0001-Add-support-for-alpine-linux.patch 549a15c393806176e1640ee5c47d76fb142b40d96a68be854379fa96c987e86ff29dac5172cc619b33bb2ebb1f9eb3bc1e92bceced3f25e63c16ddc9ef2ac578 0001-Add-missing-fcntl.h-to-includes-in-mount_zfs.c.patch bab158b4f32e34d346f5a97406ba1d58783e5965906e60cae1ef40d1a7a78f505558d0eaaff62f03f4965ae3b4168b5b469636556f6393553cf8540ec400a9b5 0002-Add-support-for-libtirpc.patch 94ecaeb8ec16c1af3b40eb44081e4db4f5dd5f8c0c3edece2b6bdec7ac2be993f041066c41c0b94cb75f9413681be0c846249413956712096f8181aa0f26736b 0003-Use-the-correct-macro-to-include-backtrace.patch 12c0d3d81e788c6f13aa0435b72ae64af32170ae30b98bb2b112984a82231f67ec5f46d7867264eba27b22d899f3132bf9687c9a7973eb43055597a994e1bf73 0004-Ensure-correct-return-value-type.patch d5de48b1206583543f0f324e41abaea3ee3628f513cdb059e17758943ed1d97fcd685f463d9f8a52f5d85ac9b94630b9332e849cf2466852a83279acec4ca977 0006-Include-sys-types.h-in-devid.h.patch 4b6638ee3dde6c92f93208434b831076542437a7552a4d779c6bd104195be2cf01e09716e08ab7fd231ae2297f8f427a4e3985c1fa85e7f4becea281b923da4a 0008-Set-_DATE_FMT-to-if-not-defined-in-libspl-timestamp..patch 5707e8e7957e0e849ef68fb126fea61f4f2d54b8a8f29f1bad2aeefb851fc4f8cffaf5a1f1e8c02ca7d47471bc97ac364b864c1f9a4d03c7c552eab86484e368 468e0c54b8d34d93043c9631cab954fb88fff8cb.patch 2227fa9906741ba335ee94abeb1db29f39a885d791f8455bae6e3f63392c55923ad8d01a2163fbcf85dcd473312aeeba8e13462feb3c099559fdc35623d45797 3bca72de3c30598c585c910208459a0cf05b9f0d.patch"