# Maintainer: Yurii Kolesykov # based on testing/linux: Jan Alexander Steffens (heftig) pkgbase=linux-drm-next-git pkgver=6.0.r1123340.bafaf67c42f4 pkgrel=1 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 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' '85f7327e262056043514a24eb6c8d46e3ac6a10a6caff09d664dec8827829144') 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 $(