# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=kmod pkgver=16 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" 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 rm -f "$pkgdir"/usr/lib/*.la } libs() { pkgdesc="Libraries to handle kernel module loading and unloading" mkdir -p "$subpkgdir"/ mv "$pkgdir"/lib "$subpkgdir"/ } md5sums="3006a0287211212501cdfe1211b29f09 kmod-16.tar.xz 350ef5291e72a563f3452309ba8f56d5 strndupa.patch" sha256sums="63412efab37c70459ccef167556965c93fd4f56af5986cd3750542a684c613c5 kmod-16.tar.xz f0f0156b3a02b1fefb346c972d276866349ee13e52237e195cb058e2971dfa77 strndupa.patch" sha512sums="326921bb184d53840837cc600f6301b948031ef7c2048e46ef16bc26ef7b967fa3c20cb133b1ebbddcf8a8537e9af8166fbca6a28d94f694f12ce1d89361a1bc kmod-16.tar.xz 0a4f407cad324bb9e210845cb35db607f064e2030484e8a4bee8802ed8f813040e23e2d36891904d64bdcf9bd5ba82b37dd382a6a1fb7bddc987a006de5c40f6 strndupa.patch"