summaryrefslogtreecommitdiff
path: root/libre/dkms-libre/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/dkms-libre/PKGBUILD')
-rw-r--r--libre/dkms-libre/PKGBUILD66
1 files changed, 66 insertions, 0 deletions
diff --git a/libre/dkms-libre/PKGBUILD b/libre/dkms-libre/PKGBUILD
new file mode 100644
index 000000000..99caab5fa
--- /dev/null
+++ b/libre/dkms-libre/PKGBUILD
@@ -0,0 +1,66 @@
+# $Id: PKGBUILD 90494 2013-05-12 22:57:28Z seblu $
+# Maintainer: Sébastien Luttringer
+# Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
+# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
+
+_pkgname=dkms
+pkgname=dkms-libre
+pkgver=2.2.0.3
+pkgrel=14
+pkgdesc='Dynamic Kernel Modules System, with linux-libre-headers and linux-libre-lts-headers recommendation'
+arch=('any')
+url='http://linux.dell.com/dkms/'
+license=('GPL2')
+depends=('bash' 'kmod' 'gcc' 'make' 'patch')
+optdepends=('linux-libre-headers: build modules against linux-libre kernel'
+ 'linux-libre-lts-headers: build modules against linux-libre-lts kernel')
+replaces=$_pkgname
+conflicts=$_pkgname
+provides=$_pkgname=$pkgver
+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"
+ '01-broken-uninstall.patch'
+ '02-no-kernel-hook.patch')
+md5sums=('11a8aaade2ebec2803653837c7593030'
+ '33be2fbf1bcc1b3fb2f38d9e7eaa809d'
+ '02e9744e3fdc3d2f68e46966fb32e260'
+ '267632312aa52a190ec0db0758920dd3'
+ '2dfd8656dc79afd229c1481a90fb645b'
+ '82d520c39c99c34977e48b313a189c6c')
+
+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() {
+ # 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
+ cd $_pkgname-$pkgver
+ make \
+ DESTDIR="$pkgdir" \
+ SBIN="$pkgdir/usr/bin" \
+ BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
+ install
+}
+
+# vim:set ts=2 sw=2 et: