Commit 13b1f172 authored by BrLi's avatar BrLi

linux: add hook support

parent f3a60920
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/modules/%KERNVER%/*
Target = usr/lib/modules/%EXTRAMODULES%/*
[Action]
Description = Updating %PKGBASE% module dependencies...
When = PostTransaction
Exec = /usr/bin/depmod %KERNVER%
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/vmlinuz-%PKGBASE%
Target = usr/lib/initcpio/*
[Action]
Description = Updating %PKGBASE% initcpios...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
......@@ -5,7 +5,7 @@ pkgbase=linux
pkgname=('linux' 'linux-headers' 'linux-docs')
_srcname=linux-${_basekernel}
pkgver=${_kernelver}
pkgrel=1
pkgrel=2
arch=('x86_64')
url="http://www.kernel.org/"
license=('GPL2')
......@@ -16,13 +16,18 @@ source=(http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
# the main kernel config files
config.x86_64
# standard config files for mkinitcpio ramdisk
linux.preset)
linux.preset
# pacman hooks
60-linux.hook
90-linux.hook)
sha256sums=('5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769'
'SKIP'
'6be2c185839d730769a8e6bcf46ca0962845732e25ed4801fe1ea995218b1133'
'SKIP'
'cd28fd682e578ced6f11d697057b9bcc1eff23f758e2ec1e0257516c7ba3cb87'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c')
'50b72cb7e96708c60958374aafd146bafc016e7714d7c3722c3b4320e0a9978d'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919')
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
......@@ -132,6 +137,17 @@ package_linux() {
# add vmlinux
install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
# install pacman hooks
local _subst="
s|%PKGBASE%|${pkgbase}-CHAKRA|g
s|%KERNVER%|${_kernver}|g
s|%EXTRAMODULES%|${_extramodules}|g
"
sed "${_subst}" ../60-linux.hook |
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
sed "${_subst}" ../90-linux.hook |
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
}
package_linux-headers() {
......@@ -213,3 +229,5 @@ package_linux-docs() {
find "${pkgdir}" -type f -exec chmod 444 {} \;
find "${pkgdir}" -type d -exec chmod 755 {} \;
}
# vim:set ts=8 sts=2 sw=2 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