summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 09b58573a78a2d87515ae9c4897e549d1ca7bad1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Dave Reisner <dreisner@archlinux.org>

pkgname=kmod-git
pkgver=19.33
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"
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')

pkgver() {
  cd 'kmod'
  git describe | {
    IFS=- read M m _
    printf '%s.%s' "${M#v}" "${m:-0}"
  }
}

build() {
  cd kmod

  ./autogen.sh
  ./configure \
      --prefix=/usr \
      --sysconfdir=/etc \
      --libdir=/usr/lib \
      --disable-python \
      --with-zlib \
      --without-xz

  make
}

package() {
  make -C kmod DESTDIR="$pkgdir" install

  # config 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
    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"
}

# vim: ft=sh syn=sh et