# Maintainer: Jonathan Wright # Contributor: Boohbah # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-mainline-anbox-git pkgver=5.19rc1.r0.gf2906aa86338 pkgrel=1 pkgdesc='Linux Mainline' url="https://www.kernel.org" arch=(x86_64) license=(GPL2) makedepends=( cpio bc kmod libelf git pahole xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') _srcname=linux-mainline-anbox source=( "$_srcname::git+https://github.com/torvalds/linux" config # the main kernel config file ) sha256sums=('SKIP' 'SKIP') 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 git describe --long | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g;s/\.rc/rc/' } prepare() { cd $_srcname echo "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${_srcname#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 # Keep these options enabled at all times scripts/config -e CONFIG_ASHMEM scripts/config -e CONFIG_ANDROID scripts/config -e CONFIG_ANDROID_BINDER_IPC scripts/config -e CONFIG_ANDROID_BINDERFS scripts/config --set-str CONFIG_ANDROID_BINDER_DEVICES "binder,hwbinder,vndbinder,binderfs" # Prevent stagnation cat .config > ../config make -s kernelrelease > version echo "Prepared $pkgbase version $(