# 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.7.r1234279.002e96d8067f pkgrel=1 pkgdesc='Linux kernel with bleeding-edge GPU drivers' url=https://cgit.freedesktop.org/drm-tip _product="${pkgbase%-git}" _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' 'f77aab33af83c635e0445c6e424922cdc054efe2430c8c831f8bead23e08ba88') b2sums=('SKIP' 'eee80b262d447770f89bb16e4c84a5faedd8e2a46d57a5b6ad6371f5a9a8e11194f82c9160d78486fc1a889ad9dea6f0b2d90b8a21235aefc30bf7fe3ef355f6') 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 $(