# Maintainer: graysky # Contributorr: Jan Alexander Steffens (heftig) pkgbase=linux-rc pkgrel=1 _srcname=linux-5.4 url="https://www.kernel.org/" _major=5.4 ### on initial release this is null otherwise it is the current stable subversion ### ie 1,2,3 corresponding $_major.1, $_major.3 etc. _minor= ### on initial release comment this out and set to =1 #_minorc=$((_minor+1)) _minorc=1 ### on initial release this is just $_major #_fullver=$_major.$_minor _fullver=$_major _rcver=1 _rcpatch=patch-${_major}.${_minorc}-rc${_rcver} pkgver=${_major}.${_minorc}rc${_rcver} arch=(x86_64) license=(GPL2) makedepends=( kmod inetutils bc libelf ) options=('!strip') source=( https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/"$_rcpatch".{xz,sign} # https://lkml.org/lkml/2019/8/23/712 # "$_rcpatch.patch::https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/patch/?id=$_srcname.y&id2=v${_major}.${_minor}" https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_fullver.tar.{xz,sign} config # the main kernel config file 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) sha256sums=('b268e03071c32a37528ade537ecd598d48915cd03f5c1586c3b46b8332a1d7f1' 'SKIP' 'bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491' 'SKIP' 'bbf6f0f69de9b1aefc2374da6b289a132b945e87a94ec85728097c677ebbac3f' 'b008f5e21bdbaaf95aecebe443761ee0a9adfb4dcf5729e384dcd53323bab149') _kernelname=${pkgbase#linux} export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { cd linux-${_fullver} msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > 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" "$(