core/dkms/PKGBUILD

59 lines
1.7 KiB
Bash
Raw Normal View History

pkgname=dkms
pkgver=2.3+git161025
2016-07-22 12:33:29 +08:00
pkgrel=1
2012-04-10 02:19:48 +08:00
pkgdesc='Dynamic Kernel Modules System'
2014-10-14 02:12:43 +08:00
arch=('any')
2012-04-10 02:19:48 +08:00
url='http://linux.dell.com/dkms/'
license=('GPL2')
2014-10-14 02:12:43 +08:00
depends=('bash' 'kmod' 'gcc' 'make' 'patch')
2016-07-22 12:33:29 +08:00
makedepends=('git')
2014-10-14 02:12:43 +08:00
optdepends=('linux-headers: build modules against Chakra kernel'
'linux-lts-headers: build modules against LTS Chakra kernel')
backup=('etc/dkms/framework.conf' 'etc/default/dkms')
install=$pkgname.install
source=('git+https://github.com/dell/dkms.git#commit=88e020c'
2014-10-14 02:12:43 +08:00
"$pkgname.default"
"$pkgname.service"
"$pkgname.systemd"
2014-10-14 02:12:43 +08:00
'02-no-kernel-hook.patch')
2016-07-22 12:33:29 +08:00
md5sums=('SKIP'
2014-10-14 02:12:43 +08:00
'33be2fbf1bcc1b3fb2f38d9e7eaa809d'
'02e9744e3fdc3d2f68e46966fb32e260'
'267632312aa52a190ec0db0758920dd3'
2014-10-14 02:12:43 +08:00
'82d520c39c99c34977e48b313a189c6c')
2014-10-14 02:12:43 +08:00
prepare() {
2016-07-22 12:33:29 +08:00
cd dkms
# apply patch from the source array (should be a pacman feature)
local filename
for filename in "${source[@]}"; do
if [[ "$filename" =~ \.patch$ ]]; then
msg2 "Applying patch $filename"
patch -p1 -N -i "$srcdir/$filename"
fi
done
2016-07-22 12:33:29 +08:00
2014-10-14 02:12:43 +08:00
# /usr move
msg2 '/usr move patching'
for i in dkms{,_framework.conf,.bash-completion,.8,_common.postinst}; do
sed -ri 's,/lib/modules,/usr/lib/modules,g' "$i"
done
# fix hardcoded paths
sed -i "s|/sbin/depmod|depmod|" dkms
}
package() {
2014-10-14 02:12:43 +08:00
# systemd
install -D -m 644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -D -m 755 $pkgname.systemd "$pkgdir/usr/lib/systemd/scripts/$pkgname"
install -D -m 644 $pkgname.default "$pkgdir/etc/default/$pkgname"
2014-10-14 02:12:43 +08:00
# upstream installer
2016-07-22 12:33:29 +08:00
cd dkms
2014-10-14 02:12:43 +08:00
make \
DESTDIR="$pkgdir" \
BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
install
2012-04-10 02:19:48 +08:00
}