summaryrefslogtreecommitdiff
path: root/testing/kmod/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-22 00:01:45 +0000
committerroot <root@rshg054.dnsready.net>2012-06-22 00:01:45 +0000
commitfb930f28bff4a4b4b37444e3f570904d6db3d06e (patch)
treebb84b848119e7cb7050f05dd3ea2478c8ada7cf0 /testing/kmod/PKGBUILD
parent6d22541bcebb7236bedfb98a96d5a1292072e86c (diff)
Fri Jun 22 00:01:45 UTC 2012
Diffstat (limited to 'testing/kmod/PKGBUILD')
-rw-r--r--testing/kmod/PKGBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/testing/kmod/PKGBUILD b/testing/kmod/PKGBUILD
new file mode 100644
index 000000000..e4c947e97
--- /dev/null
+++ b/testing/kmod/PKGBUILD
@@ -0,0 +1,59 @@
+# $Id: PKGBUILD 162116 2012-06-20 13:14:03Z dreisner $
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
+
+pkgname=kmod
+pkgver=9
+pkgrel=1
+pkgdesc="Linux kernel module handling"
+arch=('i686' 'x86_64')
+url='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary'
+license=('GPL2')
+depends=('glibc' 'zlib')
+options=('!libtool')
+provides=('module-init-tools=3.16')
+conflicts=('module-init-tools')
+replaces=('module-init-tools')
+source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz"
+ "depmod-search.conf"
+ "0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch")
+md5sums=('c8ae2d2694fbca2b28e238b30543a0cd'
+ 'dd62cbf62bd8f212f51ef8c43bec9a77'
+ 'b099be8997331dcb549617188cabc6af')
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ patch -Np1 <"$srcdir"/0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch
+
+ ./configure \
+ --sysconfdir=/etc \
+ --with-zlib \
+ --with-rootprefix=/usr
+
+ make
+}
+
+check() {
+ # testsuite is broken on 32-bit because of an unhandled EEXIST on mkdir_p
+ make -C "$pkgname-$pkgver" check || :
+}
+
+package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+ # extra directories
+ install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d "$pkgdir/sbin"
+
+ # add symlinks to kmod
+ ln -s ../usr/bin/kmod "$pkgdir/sbin/modprobe"
+ ln -s ../usr/bin/kmod "$pkgdir/sbin/depmod"
+
+ for tool in {ins,ls,rm}mod modinfo; do
+ ln -s kmod "$pkgdir/usr/bin/$tool"
+ done
+
+ # install depmod.d file for search/ dir
+ install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf"
+}
+
+# vim: ft=sh syn=sh et