# Maintainer: Mizuha # Contributor: Kyle De'Vir (QuartzDragon) # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-zen-bcachefs-git pkgver=v5.10.27.zen1.r971607.feeca9682c64 _srcver_tag=v5.10.27.zen1 pkgrel=1 pkgdesc="Linux ZEN with bcachefs" url="https://github.com/koverstreet/bcachefs" arch=(x86_64) license=(GPL2) makedepends=( bc kmod libelf pahole cpio perl tar xz xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick git ) options=('!strip') _linuxname="linux-kernel" _linuxurl="https://git.kernel.org/pub/scm/linux/kernel/git/stable/${_linuxname%%-kernel}.git" _bchfsname="bcachefs-kernel" _bchfsurl="https://github.com/koverstreet/${_bchfsname%%-kernel}.git" _zenname="zen-kernel" _zenurl="https://github.com/zen-kernel/${_zenname}.git" source=( "${_linuxname}::git+${_linuxurl}#branch=linux-5.10.y" "${_bchfsname}::git+${_bchfsurl}#branch=master" "${_zenname}::git+${_zenurl}#branch=5.10/master" choose-gcc-optimization.sh config # the main kernel config file ) validpgpkeys=( "ABAF11C65A2970B130ABE3C479BE3E4300411886" # Linus Torvalds "647F28654894E3BD457199BE38DBBDC86092693E" # Greg Kroah-Hartman ) sha512sums=( 'SKIP' 'SKIP' 'SKIP' '95397a817c10437f5f1765a1a529744cce905e142d8a835769f9271d2736b5dc967900e068999540a9032ccb6b8db080d0e92a48fcdb1d948aa0e7d1f34d2984' '70d1b2da1642b9941230d03d62f061f47e94ea65882d014e311ce292fbceabd26e3362035a321971a7fdf3909ebd50fd3538b294c9d90ade61ec7a2ef0f8499f' ) 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 "$srcdir/$_bchfsname" git remote add zen "$srcdir/$_zenname" || true git remote add linux "$srcdir/$_linuxname" || true git pull --no-edit --no-rebase zen makepkg git pull --no-edit --no-rebase linux makepkg || git checkout --theirs Makefile msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname msg2 "Setting config..." cp "$srcdir/config" .config # Lets user choose microarchitecture optimization in GCC sh "$srcdir/choose-gcc-optimization.sh" make prepare # Do not run 'make olddefconfig' as it sets default options yes "" | make config >/dev/null make -s kernelrelease > version msg2 "Prepared $pkgbase version $( "$startdir/config.last" } pkgver() { cd "$srcdir/$_bchfsname" printf "%s.r%s.%s" "${_srcver_tag//-/.}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } build() { cd "$srcdir/$_bchfsname" make all make htmldocs } _package() { pkgdesc="The $pkgdesc kernel and modules" depends=(coreutils kmod initramfs bcachefs-tools-git) optdepends=( 'crda: to set the correct wireless channels of your country' 'linux-firmware: firmware images needed for some devices' ) provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE VHBA-MODULE) replaces=() cd "$srcdir/$_bchfsname" local kernver="$(