# Maintainer: Levente Polyak # Contributor: Daniel Micay # Contributor: Tobias Powalowski # Contributor: Thomas Baechler pkgbase=linux-hardened-git _srcname=${pkgbase/-git/} _gitbranch=5.6 pkgver=5.6.2.r902727.ga28803964450 pkgrel=2 pkgdesc='Security-Hardened Linux' 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 git ) options=('!strip') source=("${_srcname}::git+https://github.com/anthraxx/linux-hardened#branch=${_gitbranch}?signed" config # the main kernel config files ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman '65EEFE022108E2B708CBFCF7F9E712E59AF5F22A' # Daniel Micay 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak ) sha256sums=('SKIP' '4b634080227d5c00e0cbce15daeae45fb729cc20a41ca0edc92dd11953471d76') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" pkgver() { cd $_srcname printf "%s.%s.%s%s.r%s.g%s" \ "$(grep '^VERSION = ' Makefile|awk -F' = ' '{print $2}')" \ "$(grep '^PATCHLEVEL = ' Makefile|awk -F' = ' '{print $2}')" \ "$(grep '^SUBLEVEL = ' Makefile|awk -F' = ' '{print $2}')" \ "$(grep '^EXTRAVERSION = ' Makefile|awk -F' = ' '{print $2}'|sed 's/-//')" \ "$(git rev-list --count HEAD)" \ "$(git rev-parse --short HEAD)" } prepare() { cd $_srcname echo "Setting version..." rm -f localversion* include/config/kernel.release scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname echo "-r$(git rev-list --count HEAD)" > localversion.30-revision 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 $(