# Maintainer: Blaž Hrastnik # Maintainer: Jan Alexander Steffens (heftig) pkgbase=linux-surface pkgver=5.14.15.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 ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) ) sha256sums=('SKIP' 'f98065a286a6d2dbb0e226867a6417e344aaa44ef6eac967707e1f09671be445' '63e0aa01e590c789a2a312f48cdc467b29734465cdf87e206b7a7e0f82e22bc4' 'b30cd71018df7e98101ba0cf37054169006b096d2870a9f8467dd96378b02b98' 'd73e7f4dec78e5c82feab81d3dc4bdc0f98d8e00287e11ff04c147b52c7d234a' 'b7c2944150afc54d81d6be9c558973a7cd1457511cb627aa2b919ce5a3bbf234' 'b259a4e26722f42c8a71179b6ec66aa2aa9099d5558c6f17114d4e5e78e3d128' 'bb21a53c74685cab412578a69ec4cac37e08758e16943c152bdfaa4ea05d6745' '4ffe19461919a56960fd8bd2775cb55144a8e87466b3667678c56c68ffebd2a7' '47ef1e578c76d7579d21801d53eb04fe4f120097f8c6f57bf2dd233190fbe75a' 'd37637392004d68430bf86a108cca9f0e5ab1b241caac86bc700202801879098' '0653f2d63e63d1de91e64673f9e4e91f1159e3a55c1726754cbf7148e5570370' 'e2880e82f7a911dffeb09226c27635d6ecec330d3393ade7e2f50374fa085168' '6e8256af155c2c0db98070381a29ae91681a0ea95f868a11632ae7b513309f6f' 'e7a3f0babfd56df6d3c7e5e4ad459af9c596ca10661b3d6df88ced441d60b227') 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 $(