#!/usr/bin/env bash

sudo apt install -y build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-$(uname -r) python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging git libcurl4-openssl-dev

git clone https://github.com/openzfs/zfs /var/tmp/zfs

cd /var/tmp/zfs

git checkout master

sh autogen.sh
./configure
make -s -j$(nproc)
make deb
