# Maintainer: Blaž Hrastnik # Maintainer: Jan Alexander Steffens (heftig) pkgbase=linux-surface pkgver=5.16.9.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' 'c703fe161185fb827e033586383662610e4764dbfa0cd6df859d68d5c57a0afc' '4b9ff2697e7e772674b823376d763b4b50692c9a369dd15c96ba69b2a77d7a6e' 'e472c2af6c1dd42ce154f1b356720dc564e33a877db07e1e8d243b1c3aff64d5' '2de7a568ea3f3d53923f9e92e0184885669fd9d36901b1ec45f7905083720c2f' 'a614390661943f06a313ea53e009c246a06368148244ca84cd1186fdefd4d27e' '2c42107b080f121f573d5a035f91e9b00ba4d21fa9a1ac2fa11d692a6c91fce1' '391c66d68ccfbac9d643946bd15518300fe0490ffe06e6f7d550dc4cd658dd86' '75447721604ad0d7f366c86f30d38693ec2f425a3afa958aa5e5c8cc24097f3f' 'e4ebf0b4de7d8ae75cd091ff1e763ba8e6bdbf33433b3310fa149326182ae158' '5f386a0585ae67634242cafd5d298295becb3048847718f424728c97c00234a4' '25d4e17f90a37005269ea63e65622fc2a1c9c752306fb750c5175069d70d8556' '0332c924c8d3462c1e267c75d8c64da96c0abd4e3b475073b035aaf764f96fd8') 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 $(