jobextra/dkms/PKGBUILD

84 lines
2.9 KiB
Bash
Raw Normal View History

2022-07-05 13:33:12 +02:00
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=dkms
2023-01-22 15:03:17 +01:00
pkgver=3.0.10
pkgrel=02
2022-07-05 13:33:12 +02:00
pkgdesc='Dynamic Kernel Modules System'
arch=('any')
url='https://github.com/dell/dkms'
depends=('coreutils' 'bash' 'gawk' 'sed' 'kmod' 'gcc' 'make' 'patch')
makedepends=('git')
2022-07-16 00:07:09 +02:00
optdepends=('linux-headers: build modules against the LTS 5.15 kernel'
'linux-lts-headers: build modules against the LTS 5.10 kernel'
'linux-lts54-headers: build modules against the LTS 5.4 kernel')
2022-07-05 13:33:12 +02:00
backup=('etc/dkms/framework.conf')
install=$pkgname.install
source=("git+https://github.com/dell/dkms.git#tag=v$pkgver"
'hook.install'
'hook.remove'
'hook.upgrade'
2022-10-08 19:45:53 +02:00
'hook.sh')
2022-07-05 13:33:12 +02:00
prepare() {
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
# /usr move
msg2 '/usr move patching'
for i in dkms{.in,.8.in,_framework.conf,.bash-completion,_common.postinst}; do
sed -ri 's,/lib/modules,/usr/lib/modules,g' "$i"
done
}
package() {
# alpm hooks
install -D -m 644 hook.install "$pkgdir/usr/share/libalpm/hooks/70-dkms-install.hook"
# both upgrade and remove hooks are removing dkms modules.
# remove always call depmod while upgrade never, as install will later.
# upgrade is run before remove in order to have the cleanest depmod file,
# if something goes wrong before the depmod call in install hook.
install -D -m 644 hook.upgrade "$pkgdir/usr/share/libalpm/hooks/70-dkms-upgrade.hook"
install -D -m 644 hook.remove "$pkgdir/usr/share/libalpm/hooks/71-dkms-remove.hook"
# hook helper
install -D -m 755 hook.sh "$pkgdir/usr/share/libalpm/scripts/dkms"
# upstream installer
cd dkms
# we don't need kconf files and libdir is only for debian stuff, so
# we install them outside of $pkgdir
make \
DESTDIR="$pkgdir" \
SBIN="$pkgdir/usr/bin" \
BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
KCONF="$srcdir"/trash \
LIBDIR="$srcdir"/trash \
install
}
#---- license gpg-key sha256sums ----
license=('GPL2')
2022-07-16 00:07:09 +02:00
sha256sums=(SKIP
2022-11-15 16:45:12 +01:00
acdc5b45cc018cea04ee1aec56fd8fc3a2de62cf7bc41acf53b3790872120998 # hook.install
326515cc7d00f93760beb844434ca7442caf7a9424614aa95a8f6d1ab79e15df # hook.remove
4f8dff7716e73a8bba885638f12e3cdc9e87daec1896f75e700b981527e43870 # hook.upgrade
2022-10-08 19:45:53 +02:00
c1b4a4e2e4e0e0e59ee0887403e79d60b209f3878dbbec6612573f13b90cce01) # hook.sh
2022-09-17 21:07:26 +02:00
2022-12-12 18:02:45 +01:00
# 85046fb0accb7a9cf8481cda21e9f7acfb6300ebceffb4bb0dd642fd2cb46722 dkms-3.0.9-01-any.pkg.tar.xz
2022-09-17 21:07:26 +02:00
2023-01-22 15:03:17 +01:00