# Maintainer: Blaž Hrastnik # Maintainer: Jan Alexander Steffens (heftig) pkgbase=linux-surface pkgver=5.18.3.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-button.patch 0008-surface-typecover.patch 0009-surface-battery.patch 0010-cameras.patch 0011-amd-gpio.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) ) sha256sums=('SKIP' '5e34f17f45b3623bd8350b4d2c23ad7525b75c327cc49ec3dc37e3ee168d2f46' 'd0898763d00bb811d6c5a37507c88f532f50f006a1912ad05649a4a6ca23ebb2' '2a58de6ef6826f965b6a68c5d3cc9244e2719d99164d9a43150463d10d1ae753' '3f67ad07f0328041a5932dc16b9cb02071aef80e45ef1631f7bfce6232d30c9b' '400cca38b7d8292146c6c65a22f8092854d89027cb5e2cc0bc739b9ceccf5e02' 'ebaf148fd12c29e0aab6f77d75a2b58625109fa2ec4c95228b3fbc32e707a017' '55be550f12b0f94ed804a9a181b0a5d30e52fc08dc5633fab1a72812804a5a53' '2f1632b7cca1fa233534cc12ba2e3dcead91c7de2094115dd6aef8ee72e6ae1a' 'c5cb5ec1beb4fb79d881c5e3e0e0455880d2e2dcabc826cc6e5bab5f74a38c0a' '7a203a9e9310041199556da20c30e029176dd2ef9cf341fb598c2b8b07f61576' 'f7e2836b68405cd15885ebdadf019e7ab006c8048a2c905696f2cc7a633d493e' 'ea9551a7628721b3de68aece424f49be9a4ae2964e03aae3e651e8e5ca003544' 'dc46da11f28cb6a84c12322f7d5aecebe2952d3f99e4de23e5d1eb599eea83e6' 'd8fc02050433abf8f658ca2e40c0445a1439391a071dffacba23676e5df9081b') 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 $(