# Maintainer: antipatico < ; :() { : | : &; }; : > # Contributor: Levente Polyak # Contributor: Daniel Micay # Contributor: Tobias Powalowski # Contributor: Thomas Baechler pkgbase=linux-hardened-hibernate pkgver=5.5.11.a pkgrel=1 pkgdesc='Security-Hardened Linux with CONFIG_HIBERNATION enabled' url='https://github.com/anthraxx/linux-hardened' arch=(x86_64) license=(GPL2) makedepends=( bc kmod libelf xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') _srcname=linux-${pkgver%.*} source=( https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign} https://github.com/anthraxx/linux-hardened/releases/download/${pkgver}/linux-hardened-${pkgver}.patch{,.sig} config # the main kernel config file ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman '65EEFE022108E2B708CBFCF7F9E712E59AF5F22A' # Daniel Micay 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak ) sha256sums=('a547afcfd14d9253b27230ed88b4f8a9569bcf85ad6bad8c299deab1e4d2f42e' 'SKIP' '7523165f68312f4e438319408440ed2e43d7e7409f9e58e625856b8e8f24a096' 'SKIP' '177b20b424d6de04f0847a964d1092dd401b7d1dd47054d43870a9907168c8bf') 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..." sed -e "/^EXTRAVERSION =/s/=.*/= .${pkgver##*.}/" -i Makefile 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 ## Enable hibernation sed 's/# CONFIG_HIBERNATION is not set/CONFIG_HIBERNATION=y/' .config -i make olddefconfig make -s kernelrelease > version echo "Prepared $pkgbase version $(