# Maintainer: Blaž Hrastnik # Maintainer: Jan Alexander Steffens (heftig) pkgbase=linux-surface pkgver=5.16.8.arch1 pkgrel=1 pkgdesc='Linux' _shortver=${pkgver%.*} _fullver=${pkgver%.*}-${pkgver##*.} _srctag=v${_fullver} url="https://github.com/archlinux/linux/commits/$_srctag" arch=(x86_64) license=(GPL2) makedepends=( bc kmod libelf cpio perl tar xz python # we don't need `pahole` as deps because we disable `CONFIG_DEBUG_INFO` # ignoring deps for docs because we don't build docs package git ) optdepends=('iptsd: Touchscreen support') options=('!strip') _srcname=archlinux-linux source=( "$_srcname::git+https://github.com/archlinux/linux#tag=$_srctag" config # the main kernel config file surface.config # surface specific options arch.config # config changes for linux-surface kernel 0001-surface3-oemb.patch 0002-mwifiex.patch 0003-ath10k.patch 0004-ipts.patch 0005-surface-sam.patch 0006-surface-sam-over-hid.patch 0007-surface-gpe.patch 0008-surface-button.patch 0009-surface-typecover.patch 0010-cameras.patch 0011-amd-gpio.patch 0012-misc-fixes.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) ) sha256sums=('SKIP' '7cbba374356a189faac71001c5344ce8f02434684b1ce1accefc0cc4bd6718e5' '63e0aa01e590c789a2a312f48cdc467b29734465cdf87e206b7a7e0f82e22bc4' 'b30cd71018df7e98101ba0cf37054169006b096d2870a9f8467dd96378b02b98' 'b170be558d9f62cec7afec5e2bb002524256d5fa1d82dc0412b3dd7cd0c7e6fb' 'a3ed1962d636de3250229fcfac724c50e890ea51d9b88675a8218c7aafba9321' 'd3550179c596ecdc4bc3d2f84bfca55d957c668b82e9f2b79b62d4ced3465a54' '464d98be85b15a71c79d3d8cdad41a99acbb03eb8c8e4540b0ffb44e59c6a5cf' '684e79d400b96ad547191128fe40b4b4a8602b8db0ebaef8d601b2e884f8eaf3' '4d191cbcf4a4aaaad7c18077ad314ec0143c1862569828b0c4686f9099a57de9' 'f2db169c351244f621add715c62cfd4305fcaddde250733032e9dff55a67d42d' '349e12684dad74a95308781a918a08b6f248282af9217e0f6c870b2078133a4b' '65a0f86569bd68aff2add4e056642bb8cd47bc094c41f74b4caddc5b4302cf4c' 'c66407affe0d73e7e5642f0d62b3a7ce8c16860004cee834412820921819def7' '74b2343d8577e446a1c2de9f72839c24b65fcdda6d600812bbcfe9bcc6eca881' '54b81e4aba3f88f03da5e979d37d116f4b3e1b5d69c8da8f83ff154a3addfad0') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" # optional certificate and key for secure boot signing _mok_crt="$PWD/MOK.crt" _mok_key="$PWD/MOK.key" prepare() { cd $_srcname echo "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname # setup git git config --local user.email "surfacebot@users.noreply.github.com" git config --local user.name "surfacebot" local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." git am -3 "../$src" done echo "Setting config..." # cp ../config .config # merge the two configs together ./scripts/kconfig/merge_config.sh -m ../config ../surface.config ../arch.config make olddefconfig make -s kernelrelease > version echo "Prepared $pkgbase version $(