diff options
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 81 | ||||
-rw-r--r-- | depmod-search.conf | 2 | ||||
-rw-r--r-- | depmod.hook | 13 | ||||
-rw-r--r-- | depmod.script | 9 |
5 files changed, 95 insertions, 38 deletions
@@ -1,21 +1,31 @@ pkgbase = kmod-git - pkgdesc = interface to kernel module operations - pkgver = 19.33 + pkgdesc = Linux kernel module management tools and library + pkgver = 28 pkgrel = 1 - url = http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary - arch = i686 + url = https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git arch = x86_64 license = GPL2 - makedepends = git - makedepends = gtk-doc + checkdepends = linux-headers + checkdepends = libelf depends = glibc depends = zlib - provides = kmod=19.33 + depends = openssl + depends = xz + depends = zstd + provides = module-init-tools=3.16 + provides = libkmod.so + provides = kmod + conflicts = module-init-tools conflicts = kmod - source = git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git + replaces = module-init-tools + source = git+https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git source = depmod-search.conf + source = depmod.hook + source = depmod.script md5sums = SKIP - md5sums = 4b8cbcbc54b9029c99fd730e257d4436 + md5sums = dd62cbf62bd8f212f51ef8c43bec9a77 + md5sums = e179ace75721e92b04b2e145b69dab29 + md5sums = 18fb3d1f6024a5a84514c8276cb3ebff pkgname = kmod-git @@ -1,27 +1,31 @@ -# Maintainer: Dave Reisner <dreisner@archlinux.org> +# Maintainer: Vincent Grande <shoober420@gmail.com> +# Contributor: Dave Reisner <dreisner@archlinux.org> pkgname=kmod-git -pkgver=19.33 +pkgver=28 pkgrel=1 -pkgdesc="interface to kernel module operations" -arch=('i686' 'x86_64') -url="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary" +pkgdesc="Linux kernel module management tools and library" +arch=('x86_64') +url='https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git' license=('GPL2') -depends=('glibc' 'zlib') -makedepends=('git' 'gtk-doc') -conflicts=('kmod') -provides=("kmod=$pkgver") -source=('git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git' - 'depmod-search.conf') -md5sums=(SKIP - '4b8cbcbc54b9029c99fd730e257d4436') +depends=('glibc' 'zlib' 'openssl' 'xz' 'zstd') +checkdepends=('linux-headers' 'libelf') +#options=('strip' 'debug') +provides=('module-init-tools=3.16' 'libkmod.so' 'kmod') +conflicts=('module-init-tools' 'kmod') +replaces=('module-init-tools') +#validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi +source=("git+https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git" + 'depmod-search.conf' + 'depmod.hook' 'depmod.script') +md5sums=('SKIP' + 'dd62cbf62bd8f212f51ef8c43bec9a77' + 'e179ace75721e92b04b2e145b69dab29' + '18fb3d1f6024a5a84514c8276cb3ebff') pkgver() { - cd 'kmod' - git describe | { - IFS=- read M m _ - printf '%s.%s' "${M#v}" "${m:-0}" - } + cd kmod + git describe --tags | sed 's/-/+/g' } build() { @@ -29,29 +33,50 @@ build() { ./autogen.sh ./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --libdir=/usr/lib \ - --disable-python \ - --with-zlib \ - --without-xz + --sysconfdir=/etc \ + --with-xz \ + --with-zlib \ + --with-zstd \ + --with-openssl make } +#check() { + # As of kmod v20, the test suite needs to build some kernel modules, and thus + # needs headers available in order to run. We depend on linux-headers, but + # this is really only to try and make sure that *some* useable tree of kernel + # headers exist. The first useable tree we find is good enough, as these + # modules will never be loaded by tests. + +# local kdirs=(/usr/lib/modules/*/build/Makefile) +# if [[ ! -f ${kdirs[0]} ]]; then +# printf '==> Unable to find kernel headers to build modules for tests\n' >&2 +# return 1 +# fi + +# local kver kdir=${kdirs[0]%/Makefile} +# IFS=/ read _ _ _ kver _ <<<"$kdir" + +# make -C "$pkgname-$pkgver" check KDIR="$kdir" KVER="$kver" +#} + package() { make -C kmod DESTDIR="$pkgdir" install - # config directories + # extra directories install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d - # add symlinks to kmod - for tool in {ins,ls,rm}mod modinfo modprobe depmod; do + for tool in {ins,ls,rm,dep}mod mod{probe,info}; do ln -s kmod "$pkgdir/usr/bin/$tool" done # install depmod.d file for search/ dir - install -m644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf" + install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf" + + # hook + install -Dm644 "$srcdir/depmod.hook" "$pkgdir/usr/share/libalpm/hooks/60-depmod.hook" + install -Dm755 "$srcdir/depmod.script" "$pkgdir/usr/share/libalpm/scripts/depmod" } # vim: ft=sh syn=sh et diff --git a/depmod-search.conf b/depmod-search.conf index 3feb67b055b3..36f2cf7db693 100644 --- a/depmod-search.conf +++ b/depmod-search.conf @@ -1,5 +1,5 @@ # -# /etc/depmod.d/depmod.conf +# /usr/lib/depmod.d/search.conf # search updates extramodules built-in diff --git a/depmod.hook b/depmod.hook new file mode 100644 index 000000000000..bbb39a9517fe --- /dev/null +++ b/depmod.hook @@ -0,0 +1,13 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/modules/*/ +Target = !usr/lib/modules/*/?* + +[Action] +Description = Updating module dependencies... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/depmod +NeedsTargets diff --git a/depmod.script b/depmod.script new file mode 100644 index 000000000000..79f1ccd30262 --- /dev/null +++ b/depmod.script @@ -0,0 +1,9 @@ +#!/bin/bash + +while read -r f; do + if [[ -e ${f}vmlinuz ]]; then + depmod $(basename "$f") + fi +done + +# vim:set ft=sh sw=2 et: |