summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..16d3c483263e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Jianfeng Zhang <swordfeng123@gmail.com> 5A11FEDDF991B901B98FF2C3732AFCA703D1198A
+# Maintainer: Sébastien Luttringer
+# Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
+
+pkgname=dkms-sorted
+pkgver=2.3
+pkgrel=1
+pkgdesc='Dynamic Kernel Modules Systemi (modified alpm hook to handle dependencies)'
+arch=('any')
+url='https://github.com/dell/dkms'
+license=('GPL2')
+depends=('bash' 'kmod' 'gcc' 'make' 'patch')
+makedepends=('git')
+optdepends=('linux-headers: build modules against the Arch kernel'
+ 'linux-lts-headers: build modules against the LTS kernel'
+ 'linux-zen-headers: build modules against the ZEN kernel'
+ 'linux-grsec-headers: build modules against the GRSEC kernel')
+backup=('etc/dkms/framework.conf')
+source=("git+https://github.com/dell/dkms.git#tag=${pkgver}"
+ 'dkms-install.hook'
+ 'dkms-remove.hook'
+ 'alpm-hook')
+provides=('dkms')
+conflicts=('dkms')
+sha256sums=('SKIP'
+ '6f2fe43f98cd3e043330e599689d3471108e5022ca7edf69ad645f609ccc33ac'
+ 'a145a3a8880449a8bc824374b8409750f3cb7c003395fff5a8b9e5ff803c1328'
+ 'a897269345bdcbea4a3feca371cf24767762ae75b7cd2d7f3a4abb50797c3dbd')
+
+
+prepare() {
+ cd dkms
+
+ # /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
+}
+
+package() {
+ # alpm hook
+ install -D -m 644 dkms-install.hook "$pkgdir/usr/share/libalpm/hooks/70-dkms-install.hook"
+ install -D -m 644 dkms-remove.hook "$pkgdir/usr/share/libalpm/hooks/70-dkms-remove.hook"
+ install -D -m 755 alpm-hook "$pkgdir/usr/lib/dkms/alpm-hook"
+ # upstream installer
+ cd dkms
+ # we don't need kconf files, so we install them outside $pkgdir
+ make \
+ DESTDIR="$pkgdir" \
+ SBIN="$pkgdir/usr/bin" \
+ BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
+ KCONF="$srcdir"/kconf \
+ install
+}