# Maintainer: Maximilian Luz # Maintainer: Blaž Hrastnik # Maintainer: Jan Alexander Steffens (heftig) pkgbase=linux-surface pkgver=6.7.6.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 cpio gettext git libelf 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 ) 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-ithc.patch 0006-surface-sam.patch 0007-surface-sam-over-hid.patch 0008-surface-button.patch 0009-surface-typecover.patch 0010-surface-shutdown.patch 0011-surface-gpe.patch 0012-cameras.patch 0013-amd-gpio.patch 0014-rtc.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) ) sha256sums=('SKIP' 'd0e840aa2ae6d9552e741b195b8bb3c1830cc227e8e2a601419f9530c65ff3ba' '985cd5e0b11538f31887e451c398d226c06ca4b34c5466e93a21ebd65b7b3919' '3cabe391cc39dbee88a79f76e9e7a68f7fbcd5518941aa2ab73a77692c87dead' '09e7dd78a0b0d6c45fb2fa1d512c5afd9586fc3064a72620d3d67d49d1468e7b' 'ec41158ba5a50819c0b9ccc615f3fbd45b3ffbefee26ee5260367940824e9b8e' '1b8bb2d6e1ec43192af243745d1a9769bf2378ebc8e0d312bfaf2981e12a7398' 'a40acb336c5715eda23a0238aa6713cb6a9216309da281ac1825d2626f0575ab' 'cb29d5b013359c0adf7fc3b7ef8e3c7ed93a5afbfdb51153727ae7e96d03dc98' '8a45795f4728ce07d87104358124ac2d76cf2371e7c8ee532d672e35bd6e48be' '78f35b6db61895f7432c0228179c8cc76c8a5a0ad85d9c7b903e4998673f6977' '3d44c67ab5aa9e1c5c2d18b65857a264794dd07eaf5f97fc4931005c1990099d' 'ce9f5fae9fd9911c81f6258f87bf56887573edbe60a07d14af917dda6aeb958f' '8028abb98344b33d8cb976363c68a453a035feb128fec6306cb4e9346274c47a' 'baf365d6803fbfab31219fb06765d7d4c85c46d783ee21f1f04f3051cd686cdb' '616583336b2d75af49efa96839427d7d67665633975f9872f715cae6772ae474' '953872fa40313d7ac016ca607c9fcf31386437556c9d3c1aa9059b2a7439cdd8' 'efe04c90a0e6d2380f03a02819d1332dee34eb541b1f4bebb59c2d2e98f9ed36') 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" _make() { test -s version make KERNELRELEASE="$( localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname make defconfig make -s kernelrelease > version make mrproper # 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 echo "Prepared $pkgbase version $(