# $Id$ # Maintainer: Jan Alexander Steffens (heftig) # Maintainer: Tobias Powalowski # Maintainer: Thomas Baechler # Maintainer: Tony Lambiris #pkgbase=linux # Build stock -ARCH kernel pkgbase=linux-macbook # Build kernel with a different name _srcver=4.17.13-arch1 pkgver=${_srcver//-/.} pkgrel=1 arch=(x86_64) url="https://github.com/archlinux/linux/commits/v$_srcver" license=(GPL2) makedepends=(xmlto kmod inetutils bc libelf git) options=('!strip') _srcname=archlinux-linux source=( "$_srcname::git+https://github.com/archlinux/linux?signed#tag=v$_srcver" config # the main kernel config file 60-linux.hook # pacman hook for depmod 90-linux.hook # pacman hook for initramfs regeneration linux.preset # standard config files for mkinitcpio ramdisk macbook-wakeup.service # service file for suspend/resume events RFC-PCI-Workaround-to-enable-poweroff-on-Mac-Pro-11.patch RFC-v2-PCI-Workaround-to-enable-poweroff-on-Mac-Pro-11.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman '8218F88849AAC522E94CF470A5E9288C4FA415FA' # Jan Alexander Steffens (heftig) ) sha256sums=('SKIP' 'aa7b6756f193f3b3a3fc4947e7a77b09e249df2e345e6495292055d757ba8be6' '36e326d8a88b4087a3a0ee0d47643fc03baeda487659980d0e9d08791e4c729c' '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65' 'c5a714823c3418692bc5c212dd5d094a0e2ae6147d6726822911f1c26e3a1d1b' '7c99aaeaea7837f83a3ad215cf07277934ccf39720acee7f1c371dc86bdf89fc' '09189eb269a9fd16898cf90a477df23306236fb897791e8d04e5a75d5007bbff') _kernelname=${pkgbase#linux} : ${_kernelname:=-ARCH} prepare() { cd $_srcname msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "$_kernelname" > localversion.20-pkgname local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue msg2 "Applying patch $src..." patch -Np1 < "../$src" done msg2 "Setting config..." cp ../config .config make olddefconfig make -s kernelrelease > ../version msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)" } build() { cd $_srcname make bzImage modules } _package() { pkgdesc="The ${pkgbase/linux/Linux} kernel and modules" [[ $pkgbase = linux ]] && groups=(base) depends=(coreutils linux-firmware kmod mkinitcpio) optdepends=('crda: to set the correct wireless channels of your country') backup=("etc/mkinitcpio.d/$pkgbase.preset") install=linux.install local kernver="$( "$startdir/$install.pkg" true && install=$install.pkg # fill in mkinitcpio preset and pacman hooks sed "$subst" ../linux.preset | install -Dm644 /dev/stdin \ "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset" 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" msg2 "Fixing permissions..." chmod -Rc u=rwX,go=rX "$pkgdir" } _package-headers() { pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel" local builddir="$pkgdir/usr/lib/modules/$(