pkgbase=linux-lts419 _basever=4.19 _srcname=linux-$_basever pkgver=${_basever}.189 pkgrel=1 pkgdesc='LTS 4.19 Linux' url="https://www.kernel.org/" arch=(x86_64) license=(GPL2) makedepends=( bc kmod libelf xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') source=( https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz #ignore signature https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/patch-${pkgver}.xz #signature is mising 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 #) # https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc md5sums=('740a90cf810c2105df8ee12e5d0bb900' '99186da91cedd30af440f1ca0f74592c' 'c8b38b0e6142fc170cea5f89f86a0415' '8d3adddbed67c62b0910ec68c78ebbac') sha256sums=('0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1' 'e8fbef8ace876c095d1849968d05e1f60e3fdd9d04069b40d7d8a04e147c13fe' 'b4b1eebb42b5e9eef63892536e7fa697673155a9e6dc3944c8105e733fc553b8' 'a13581d3c6dc595206e4fe7fcf6b542e7a1bdbe96101f0f010fc5be49f99baf2') 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 $_srcname # add upstream patch echo "Updating base kernel to ${pkgver}..." test -s "${srcdir}/patch-${pkgver}" || (cd "${srcdir}"; xz -dkf "${srcdir}/patch-${pkgver}.xz") # temporary fix for file-5.40 https://bugs.archlinux.org/task/70261 patch -Nup1 -i "${srcdir}/patch-${pkgver}" echo "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 echo "Applying patch $src..." patch -Np1 < "../$src" done echo "Setting config..." cp ../config .config make olddefconfig make -s kernelrelease > version echo "Prepared $pkgbase version $(