# Maintainer: Yurii Kolesykov # based on testing/linux: Jan Alexander Steffens (heftig) pkgbase=linux-amd-staging-drm-next-git pkgver=6.0.r1125805.de9a71e391a9 pkgrel=1 pkgdesc='Linux kernel with AMDGPU WIP patches' _product="${pkgbase%-git}" _branch="${_product#linux-}" url=https://gitlab.freedesktop.org/agd5f/linux arch=(x86_64) 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://gitlab.freedesktop.org/agd5f/linux.git#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 $(