# Maintainer: Yurii Kolesnykov # Based on core/linux by Jan Alexander Steffens (heftig) # # Pull requests are welcome here: # https://github.com/yurikoles-aur/linux-drm-tip-git # pkgbase=linux-drm-tip-git pkgver=6.8.r1249554.18a9fefd9e05 pkgrel=1 pkgdesc='Linux kernel with bleeding-edge GPU drivers' url=https://cgit.freedesktop.org/drm-tip _branch=drm-tip 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://anongit.freedesktop.org/drm-tip#branch=#branch=$_branch" config # the main kernel config file ) sha256sums=('SKIP' '44ab14648c0036d070fe290c18f6dd928f29b5352b50655ad96c354f428955ca') b2sums=('SKIP' '526e6a5dc674218466d7596c8b96e219bb8a17b8a1e676c95e8d67ff3c507cc9a91e5e0c624d86ae207753f66525eaed77ce526d06186cb9d9e448116cb1bacb') 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 $(