# Maintainer: phlowx <phlowx[at]googlemail.com>
# Contributor: Xiao-Long Chen <[email protected]>

pkgname=zfs
pkgver=0.6.0rc5
_dlver=0.6.0-rc5
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="Native ZFS for Linux"
url="http://github.com/zfsonlinux/zfs"
license=('CDDL')
depends=('solaris-pl=0.6.0rc5-1')
makedepends=('linux-headers')
install=zfs.install
source=("https://github.com/downloads/zfsonlinux/zfs/zfs-${_dlver}.tar.gz")
sha512sums=('a428ab1a4b885e60f7710c5975613ff0ec073edb0bc51d9fb04447543604673357d2f400177161f93ce94fe9b829bf2f8c964f4bae97f8532aeefc7060500414')

build() {
  cd "${srcdir}/${pkgname}-${_dlver}"
  ./configure --prefix=/usr --libexecdir=/usr/lib
  make
}

package() {
  cd "${srcdir}/${pkgname}-${_dlver}"
  make DESTDIR="${pkgdir}/" install
  install -D -m755 "${srcdir}/${pkgname}-${_dlver}/etc/init.d/zfs.arch" "${pkgdir}/etc/rc.d/zfs"
}