# Maintainer: Maximilian Luz # Maintainer: Blaž Hrastnik # Maintainer: Jan Alexander Steffens (heftig) pkgbase=linux-surface pkgver=6.1.8.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 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-cameras.patch 0010-amd-gpio.patch 0011-rtc.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) ) sha256sums=('SKIP' '0571ea17a2e38458096b679418197bbea8c414388f628d122517f3a1f3a31b3a' 'f68809bdfa1924cc4d03a6a0d00b6389805eb1a58edfce5beac1dabc398ec6c8' '22902a3ac84f3ae0a8b442a99c63f81ce8f2dfd678c7c66420fffd52110f11d9' 'df6b0802d5cd66f1978fa5d358d845288d54351fe13d1f57a250e950b3aa236b' '14fbb8645042cb0c0734c249db79f555a4c89db698579cf25078f42a8e41ea4a' 'cb1fa07bfec40326e6a78bd9a9bb67e3a316daaa3f6b90493239b4bb1dd04a58' 'c77cf40559fd5ab5b9de0987e094aac1eca907b836343085964ff811ed50a907' '4c50c960396439efefd6a1412df8bb07f0f35bb3f2a3052a35dfac7c5abff756' '36da82016228c3bda0142d686169b38f69184b11e2d3b66b1519eacbc7fb3411' '8f5333037c9f0d7297ef987a903198dc46540481b5ffc72b34691557114c8c78' '8d3523cf744ea948d11890c8d4287fb30e9bc00a1cde501acf9f4a8a1fe16e40' 'af26304f0c4d8c7c3a444953313ed62cb3a7d9fea87ac671ea86564144d048ed' '2c7fba03cbe5811737cacc004a8a83cae7fa4c8fe403e230d9d6e2b6682d4a55' '69aca3c3310ce39e8e107811fc860613d6a73f5186177babad2a5eafdcad3942') 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 $(