# Maintainer: Jonathan Wright # Contributor: Boohbah # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-git pkgver=5.7rc1.r0.g8f3d9f354286 pkgrel=1 pkgdesc='Linux git' url="https://www.kernel.org" arch=(x86_64) license=(GPL2) makedepends=(bc kmod libelf git) options=('!strip') _srcname=linux source=( 'git+https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux' config # the main kernel config file ) sha256sums=('SKIP' 'd2928b8a83d2a8cd9fbb2814d904da84cd673abd1d98abbb95e45715cf985219') 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 msg2 "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 msg2 "Applying patch $src..." patch -Np1 < "../$src" done msg2 "Setting config..." cp ../config .config make olddefconfig make -s kernelrelease > version msg2 "Prepared %s version %s" "$pkgbase" "$(