# Maintainer: Yurii Kolesykov # based on testing/linux: Jan Alexander Steffens (heftig) pkgbase=linux-drm-next-git pkgver=6.2.r1153517.f422fa7cd858 pkgrel=2 pkgdesc='Linux kernel with bleeding-edge GPU drivers' _product="${pkgbase%-git}" _branch="${_product#linux-}" arch=(x86_64) url='https://cgit.freedesktop.org/drm/drm' license=(GPL2) makedepends=( bc libelf pahole cpio perl tar xz xmlto 'python-sphinx<6.0.0' python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra git ) options=('!strip') _srcname=$pkgbase source=( "$_srcname::git+https://anongit.freedesktop.org/git/drm/drm#branch=$_branch" config # the main kernel config file ) sha256sums=('SKIP' '0571ea17a2e38458096b679418197bbea8c414388f628d122517f3a1f3a31b3a') pkgver() { cd $_srcname local version="$(grep \^VERSION Makefile|cut -d"=" -f2|cut -d" " -f2)" local patch="$(grep \^PATCHLEVEL Makefile|cut -d"=" -f2|cut -d" " -f2)" printf "%s.%s.r%s.%s" "${version}" "${patch}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } 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..." 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 make olddefconfig diff -u ../config .config || : make -s kernelrelease > version echo "Prepared $pkgbase version $(