# Maintainer: Jonathan Wright # Contributor: Boohbah # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-git pkgver=5.5rc2.r385.gb8e382a185eb 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' '0d01621e8af435d01734cf0644ad8b898329f9a3e1f0037d22a9ab0969d52466') 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" "$(