# Maintainer: Blaž Hrastnik # Maintainer: Jan Alexander Steffens (heftig) pkgbase=linux-surface pkgver=5.16.11.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' 'linux-firmware: Firmware files for Linux' 'linux-firmware-marvell: Firmware files for Marvell WiFi / Bluetooth') 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' 'a7e88715c86f2ea77e80cb0535d827406676cb8227a9367dd98931f511b06f31' '63e0aa01e590c789a2a312f48cdc467b29734465cdf87e206b7a7e0f82e22bc4' 'b30cd71018df7e98101ba0cf37054169006b096d2870a9f8467dd96378b02b98' '238c131a0e2078f8168566ab91acdc8a45dbfa573957d69d8102a41161421d15' '79f8133803f6fd4e6166afaae35a3c6ed9323daf3cb6f81c7624abc205569186' 'a14a041b886d0d0500312a162401c936bcd60f973e6279a7c2d940a8351c248b' '077d7742d6ebcaf337b64d30b933c4c1144538b61030ec60314431ec70946f10' 'cffc53def40deda2f1ad0fefb517876d3bd35522299752e2242bc9017f799792' 'f8fa489d913ad9027cb982da6d3ae8365b478e1896c7ccc8c8d21c60ac00f07d' 'ac37ca3ff9511a304ad57dc0995b0284321b2bfdef486d2749662acd001f6913' '90143b0c2d66e1cc969592d6dc3cbb2e30710e3f35df7553cefad9b0d99f7dbb' '4d30bac8143e3f8f9e502e0ffa7a605ffddab867ece091f8da4da99ee3c26b09' '027f97914a5e51ca9f13d24f092e287c960e450152d7510e3d85c8e69559702f' '6f455404ebe69dec0ff002c57d08235a92f44fcb0a31e99aabd2e478fff1abe3' 'bc6c70e14335bc604ad4576a33246c52b1eff4f40ec1393b6e873acfad78d027') 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 $(