# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

pkgname=spl
pkgver=0.7.5
pkgrel=0
pkgdesc="Solaris Porting Layer (userland)"
url="http://zfsonlinux.org"
arch="all !armhf"
license="GPL"
depends=""
depends_dev=""
makedepends="$depends_dev linux-headers"
install=""
subpackages="$pkgname-doc"
source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$pkgver/spl-$pkgver.tar.gz"

builddir="$srcdir"/spl-$pkgver

prepare() {
	default_prepare
	update_config_sub
	update_config_guess
}

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-config=user
	make
}

package() {
        cd "$builddir"
        make DESTDIR="$pkgdir" install
}

sha512sums="a797ddab6841cbe9c7eacc4f276537ecb5905a694604185044e98ed017b325367a1fdd1ea6830d29d4a21ed11a8d1ff0505bda7bbd2112418db319df128141a3  spl-0.7.5.tar.gz"
