# Maintainer: N Fytilis (nicman23) n-fit[@]live[.]com # Contributor: Kyle De'Vir (QuartzDragon) # Contributor: Jan Alexander Steffens (heftig) ################################################################################# # Because the package needs to download 2 linux gits to accelerate the progress # do not let makepkg fetch them on its own. ( hint: uncomment the lines :) ) # git clone https://github.com/koverstreet/bcachefs \ # -b master --bare linux-bcachefs # use --reference if you already got a linux git in ../linux # and: # git clone https://github.com/zen-kernel/zen-kernel \ # -b 5.10/master --bare --reference linux-bcachefs linux-zen # # git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git \ # -b linux-5.10.y --bare --reference linux-zen linux-stable ################################################################################# ### BUILD OPTIONS # Set these variables to ANYTHING that is not null to enable them # Tweak kernel options prior to a build via nconfig _makenconfig= # Compile ONLY used modules to VASTLY reduce the number of modules built # and the build time. # # To keep track of which modules are needed for your specific system/hardware, # give module_db script a try: https://aur.archlinux.org/packages/modprobed-db # This PKGBUILD read the database kept if it exists # # More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db _localmodcfg= pkgbase=linux-bcachefs-510-zen pkgver=v5.10.26.arch1.r971595.17f9d1e225b9 _srcver_tag=v5.10.26.arch1 pkgrel=1 pkgdesc="Linux" url="https://github.com/koverstreet/bcachefs" arch=(x86_64) license=(GPL2) makedepends=( bc kmod libelf pahole cpio perl tar xz xmlto git ) options=('!strip') _reponame="linux-bcachefs" _pkgdesc_extra="~ featuring Kent Overstreet's bcachefs filesystem" source=( "${_reponame}::git+https://github.com/koverstreet/bcachefs" 'linux-zen::git+https://github.com/zen-kernel/zen-kernel#branch=5.10/master' 'linux-stable::git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#branch=linux-5.10.y' config # kernel config file ) validpgpkeys=( "ABAF11C65A2970B130ABE3C479BE3E4300411886" # Linus Torvalds "647F28654894E3BD457199BE38DBBDC86092693E" # Greg Kroah-Hartman ) md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' ) 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/$_reponame" git remote add zen ../linux-zen || { cd "$srcdir" rm -rf linux-bcachefs git clone ../linux-bcachefs linux-bcachefs cd - git remote add zen ../linux-zen } git remote add stable ../linux-stable EDITOR=true git pull zen makepkg EDITOR=true git pull stable 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 ../config .config make prepare ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then if [ -f $HOME/.config/modprobed.db ]; then msg2 "Running Steven Rostedt's make localmodconfig now" make LSMOD=$HOME/.config/modprobed.db localmodconfig else msg2 "No modprobed.db data found" make localmodconfig fi fi # 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/$_reponame" printf "%s.r%s.%s" "${_srcver_tag//-/.}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } build() { cd $_reponame make all } _package() { pkgdesc="The $pkgdesc kernel and modules $_pkgdesc_extra" depends=( coreutils kmod initramfs linux-firmware bcachefs-tools-git ) optdepends=( "crda: to set the correct wireless channels of your country" ) provides=( VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE ) replaces=( virtualbox-guest-modules-arch wireguard-arch ) cd $_reponame local kernver="$(