# Contributor: Levente Polyak # Contributor: Daniel Micay # Contributor: Tobias Powalowski # Contributor: Thomas Baechler # Maintainer: ptr1337 pkgbase=linux-hardened-cacule pkgver=5.13.15.hardened1 pkgrel=1 pkgdesc='Security-Hardened Linux with the cacule scheduler' url='https://github.com/anthraxx/linux-hardened' arch=(x86_64 x86_64_v3 ) license=(GPL2) makedepends=( bc kmod libelf pahole cpio perl tar xz xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') _srcname=linux-${pkgver%.*} _srctag=${pkgver%.*}-${pkgver##*.} source=( https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz https://github.com/anthraxx/linux-hardened/releases/download/${_srctag}/linux-hardened-${_srctag}.patch cacule-5.13.patch cpu-patches.patch config # the main kernel config file ) sha256sums=('330b4c395f858e75ce26a34cc008c121ef8d975736b3ea975ca65081ff93621b' 'c722b5988fec48f6593e24aa429068f489285062960b1f172770e1240b94e5bc' '2c2851ea35a8e8628caf2caf674736af0547c737652737d6a8aebf677ae92e5e' '4f22a6e4e5fe6f3bb39ca39073fa812eb9c0dbb3ac9cec64ed0a90d06b54d32a' 'ab4721efe64acbb78a995af97cf65aec3462994dd985ac36eebb146ab9d93f67') 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##*/}" [[ $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 $(