# Maintainer: Joakim Hernberg # Contributor: David Runge _pkgver=5.4.47 _rtpatchver=28 pkgbase=linux-rt-lts pkgver=${_pkgver}.${_rtpatchver} pkgrel=1 pkgdesc='Linux RT LTS' arch=('x86_64') url="https://wiki.linuxfoundation.org/realtime/start" license=('GPL2') makedepends=('bc' 'git' 'graphviz' 'imagemagick' 'kmod' 'libelf' 'python-sphinx' 'python-sphinx_rtd_theme' 'xmlto') options=('!strip') _srcname=linux-${_pkgver} source=( "https://www.kernel.org/pub/linux/kernel/v${_pkgver%%.*}.x/linux-${_pkgver}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v${_pkgver%%.*}.x/linux-${_pkgver}.tar.sign" "https://www.kernel.org/pub/linux/kernel/projects/rt/${_pkgver%.*}/older/patch-${_pkgver}-rt${_rtpatchver}.patch.xz" "https://www.kernel.org/pub/linux/kernel/projects/rt/${_pkgver%.*}/older/patch-${_pkgver}-rt${_rtpatchver}.patch.sign" 'config' '0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch' 'sphinx-workaround.patch' ) validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman '5ED9A48FC54C0A22D1D0804CEBC26CDB5A56DE73' # Steven Rostedt (Der Hacker) ) sha256sums=('970b9d393d9a8d45eafdec9c6ab0d9880c20c703eeb9b0ac409892c8bc418d6c' 'SKIP' 'dadc1379e816e8a23f09713884f8889f0177f291974487f33efc9a646082c562' 'SKIP' 'ee4fc37fd667ffc17dcc35f6b03e6f09e91267618ace8aa95e1fc6e9c56dc479' 'a13581d3c6dc595206e4fe7fcf6b542e7a1bdbe96101f0f010fc5be49f99baf2' 'b7c814c8183e4645947a6dcc3cbf80431de8a8fd4e895b780f9a5fd92f82cb8e') 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 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##*/}" # picking up the RT patch src="${src//patch.xz/patch}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done echo "Setting config..." cp ../config .config make olddefconfig # make menuconfig # CLI menu for configuration make -s kernelrelease > version echo "Prepared $pkgbase version $(