archrelease: copy trunk to extra-x86_64
[arch-packages.git] / dkms / trunk / PKGBUILD.26
blobf1b45ade598c47bdeb0c46f67552c0898834d3a8
1 # Maintainer: Sébastien Luttringer
2 # Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
4 pkgname=dkms
5 pkgver=2.6.1
6 pkgrel=1
7 pkgdesc='Dynamic Kernel Modules System'
8 arch=('any')
9 url='https://github.com/dell/dkms'
10 license=('GPL2')
11 depends=('bash' 'kmod' 'gcc' 'make' 'patch')
12 makedepends=('git')
13 optdepends=('linux-headers: build modules against the Arch kernel'
14             'linux-lts-headers: build modules against the LTS kernel'
15             'linux-zen-headers: build modules against the ZEN kernel'
16             'linux-hardened-headers: build modules against the HARDENED kernel')
17 backup=('etc/dkms/framework.conf')
18 install=$pkgname.install
19 source=("git+https://github.com/dell/dkms.git#tag=v$pkgver"
20         'hook.install'
21         'hook.remove'
22         'hook.sh'
23         '0001-Revert-Make-newly-installed-modules-available-immedi.patch'
24         '0002-Revert-Fix-to-run-under-BusyBox-shell.patch'
25         '0003-Fix-version-check-when-installing-modules.patch')
26 md5sums=('SKIP'
27          '90f1486e0af9aab85e8c60d456802c63'
28          '2e8ffd0c2ddec02872d0234befd129fd'
29          '80632f6a454b35bcade2bed287f13c7b'
30          'd3b91ef709f567a375f4bbdbd3291d2b'
31          '4342b5e9020a52a73a63e7897ead5405'
32          '00813655321b8fc256eda737ca0622ef')
34 prepare() {
35   cd dkms
37   # apply patch from the source array (should be a pacman feature)
38   local filename
39   for filename in "${source[@]}"; do
40     if [[ "$filename" =~ \.patch$ ]]; then
41       msg2 "Applying patch ${filename##*/}"
42       patch -p1 -N -i "$srcdir/${filename##*/}"
43     fi
44   done
46   # /usr move
47   msg2 '/usr move patching'
48   for i in dkms{,_framework.conf,.bash-completion,.8,_common.postinst}; do
49     sed -ri 's,/lib/modules,/usr/lib/modules,g' "$i"
50   done
53 package() {
54   # alpm hook
55   install -D -m 644 hook.install "$pkgdir/usr/share/libalpm/hooks/70-dkms-install.hook"
56   install -D -m 644 hook.remove "$pkgdir/usr/share/libalpm/hooks/70-dkms-remove.hook"
57   install -D -m 755 hook.sh "$pkgdir/usr/lib/dkms/alpm-hook"
58   # upstream installer
59   cd dkms
60   # we don't need kconf files, so we install them outside $pkgdir
61   make \
62     DESTDIR="$pkgdir" \
63     SBIN="$pkgdir/usr/bin" \
64     BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
65     KCONF="$srcdir"/kconf \
66     install
69 # vim:set ts=2 sw=2 et: