# Description: The Kmod package contains libraries and utilities for loading kernel modules.
# URL: http://www.kernel.org/pub/linux/kernel/people/rusty/modules
# Packager: pierre at nutyx dot org

PKGMK_GROUPS=(devel doc man)

name=kmod
version=22
release=1

source=(http://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-$version.tar.xz )

build()
{
cd $name-$version
./configure --prefix=/usr \
--bindir=/bin \
--sysconfdir=/etc \
--with-rootlibdir=/lib \
--disable-manpages     \
--with-xz \
--with-zlib

make
make DESTDIR=$PKG install
mkdir $PKG/sbin
for target in depmod insmod modinfo modprobe rmmod; do
  ln -sv ../bin/kmod $PKG/sbin/$target
done
ln -sv kmod $PKG/bin/lsmod
}