#!/bin/sh -e

./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --with-xz \
    --with-zlib

make
make DESTDIR="$1" install

for tool in lsmod insmod rmmod depmod modinfo modprobe; do
    ln -s kmod "$1/usr/bin/$tool"
done
