# Maintainer: Yurii Kolesnykov # Based on core/linux by Jan Alexander Steffens (heftig) # # Pull requests are welcome here: # https://github.com/yurikoles-aur/linux-amd-staging-drm-next-git # pkgbase=linux-amd-staging-drm-next-git pkgver=6.3.r1177048.5e4d5d939dd6 pkgrel=1 pkgdesc='Linux kernel with bleeding-edge AMDGPU drivers' _product="${pkgbase%-git}" _branch=amd-staging-drm-next url=https://gitlab.freedesktop.org/agd5f/linux arch=(x86_64) license=(GPL2) makedepends=( bc cpio gettext git libelf pahole perl python tar xz # htmldocs graphviz imagemagick python-sphinx texlive-latexextra ) options=('!strip') _srcname=$pkgbase source=( "$_srcname::git+https://gitlab.freedesktop.org/agd5f/linux.git#branch=$_branch" config # the main kernel config file ) sha256sums=('SKIP' '6508516de94ed941ae755d89807610dc51fe1229dbfecdf8a82604a8d33242ce') b2sums=('SKIP' '10f3d6c5c45bdd49b8863f3fb824404f89625c8be4633dce13ae20cd67c542114f73e30b9d09c5365a1728e0ae411f287610d064f3f9039635162191af3292bb') 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..." echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" src="${src%.zst}" [[ $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 $(