# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=kmod pkgver=19 pkgrel=0 pkgdesc="Linux kernel module management utilities" url="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary" arch="all" license="GPL2+" depends="" depends_dev="" makedepends="$depends_dev zlib-dev xz-dev libxslt tar" install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" source="http://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-$pkgver.tar.xz strndupa.patch" _builddir="$srcdir"/kmod-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --bindir=/bin \ --with-rootlibdir=/lib \ --with-zlib \ --with-xz \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 local i mkdir -p "$pkgdir"/sbin for i in lsmod rmmod insmod modinfo modprobe depmod; do ln -sf ../bin/kmod "$pkgdir"/sbin/$i || return 1 done rm -f "$pkgdir"/usr/lib/*.la } libs() { pkgdesc="Libraries to handle kernel module loading and unloading" mkdir -p "$subpkgdir"/ mv "$pkgdir"/lib "$subpkgdir"/ } md5sums="a08643f814aa4efc12211c6e5909f4d9 kmod-19.tar.xz a347d68599a0ab4c2abd53c89271cf67 strndupa.patch" sha256sums="3e7fee6eeff5435848b2dcc852bc8959066478d687d232284d67300c071e7b14 kmod-19.tar.xz aea9bdad0e6d0c6c5d9c3f1fe1f84f85babcd52b3077336552ae73ccbc4b0a36 strndupa.patch" sha512sums="317aebbfe12e2bd8f610d799642499d411e017cbda6082d0de92b1597753d29f42c4a2faac574879166e8cda8d7fd42ad2f98086b169e85b238cf024887ec0ee kmod-19.tar.xz f2ea3527bfba182c5e15557c224a5bba8c7e2ea3d21cf604e6eb2277226dcf983c3aeb9ac44a322c7f2b4942b35135da999d63a5b946b829d3f3b09c050a0f17 strndupa.patch"