Commit 07defdc9 authored by Xuetian Weng's avatar Xuetian Weng
Browse files

update dkms

parent 006275e2
......@@ -3,7 +3,7 @@ index abb01a4..265b69a 100644
--- a/dkms
+++ b/dkms
@@ -162,11 +162,14 @@ set_kernel_source_dir()
# A little test function for DKMS commands that only work on one kernel.
have_one_kernel() {
- (( ${#kernelver[@]} > 1 )) && \
......@@ -15,8 +15,8 @@ index abb01a4..265b69a 100644
+ die 4 $"The action $1 does not support multiple kernel version" \
+ $"parameters on the command line."
+ fi
+ if [[ $all ]]; then
+ if [[ $all ]]; then
+ die 5 $"The action $1 does not support the --all" \
+ $"parameter."
+ fi
+ fi
}
# Author: Sébastien Luttringer <seblu@seblu.net>
--- a/Makefile 2011-12-07 19:23:51.000000000 +0100
+++ b/Makefile 2013-05-13 00:48:19.620000000 +0200
@@ -46,9 +46,6 @@
gzip -c -9 dkms.8 > $(MAN)/dkms.8.gz
chmod 0644 $(MAN)/dkms.8.gz
touch --reference=dkms.8 $(MAN)/dkms.8.gz
- mkdir -p -m 0755 $(KCONF)/prerm.d $(KCONF)/postinst.d
- install -p -m 0755 kernel_prerm.d_dkms $(KCONF)/prerm.d/dkms
- install -p -m 0755 kernel_postinst.d_dkms $(KCONF)/postinst.d/dkms
DOCFILES=sample.spec sample.conf AUTHORS COPYING README.dkms sample-suse-9-mkkmp.spec sample-suse-10-mkkmp.spec
......@@ -6,48 +6,57 @@
pkgname=dkms
pkgver=2.2.0.3
pkgrel=12
pkgrel=13
pkgdesc='Dynamic Kernel Modules System'
arch=('x86_64')
arch=('any')
url='http://linux.dell.com/dkms/'
license=('GPL2')
depends=('linux-headers' 'kmod' 'sh')
backup=('etc/dkms/framework.conf')
depends=('bash' 'kmod' 'gcc' 'make' 'patch')
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=("http://linux.dell.com/$pkgname/permalink/$pkgname-$pkgver.tar.gz"
"$pkgname.default"
"$pkgname.service"
"$pkgname.systemd"
"$pkgname.default"
'01-broken-uninstall.patch')
'01-broken-uninstall.patch'
'02-no-kernel-hook.patch')
md5sums=('11a8aaade2ebec2803653837c7593030'
'33be2fbf1bcc1b3fb2f38d9e7eaa809d'
'02e9744e3fdc3d2f68e46966fb32e260'
'267632312aa52a190ec0db0758920dd3'
'33be2fbf1bcc1b3fb2f38d9e7eaa809d'
'4e3a580c09b5af8de7ffde0b61bdcfcf')
'2dfd8656dc79afd229c1481a90fb645b'
'82d520c39c99c34977e48b313a189c6c')
build() {
prepare() {
# patch
patches=("$srcdir"/*.patch)
cd $pkgname-$pkgver
for p in "${patches[@]}"; do
msg2 "Apply patch: ${p##*/}"
patch -p1 -i "$p"
done
# /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() {
# upstream installer
pushd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
popd
# fix hardcoded paths
sed -i "s|/sbin/depmod|depmod|" $pkgdir/usr/sbin/dkms
# remove debian specific
rm -r "$pkgdir/etc/kernel"
# move bash completion in right place
install -d -m 755 "$pkgdir/usr/share/bash-completion"
mv "$pkgdir/etc/bash_completion.d" "$pkgdir/usr/share/bash-completion/completions"
# add systemd
# 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"
# upstream installer
pushd $pkgname-$pkgver
make \
DESTDIR="$pkgdir" \
BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
install
popd
}
#!/bin/sh
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
if [ "$(vercmp $2 2.2.0.3-12)" -le 0 ]; then
cat << EOF
===> dkms startup config file moved to /etc/default/dkms
EOF
fi
}
# vim:set ts=2 sw=2 ft=sh et:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment