# Maintainer: Alexey Minnekhanov # Co-Maintainer: Luca Weiss _flavor=postmarketos-qcom-msm8974 _config="config-$_flavor.$CARCH" pkgname=linux-$_flavor pkgver=5.17.1 pkgrel=0 _tag="v5.17.1-msm8974" pkgdesc="Kernel close to mainline with extra patches for Qualcomm MSM8974 devices" arch="armv7" _carch="arm" url="https://kernel.org/" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-anbox pmb:kconfigcheck-containers pmb:kconfigcheck-iwd pmb:kconfigcheck-nftables pmb:kconfigcheck-zram " makedepends=" bison findutils flex gmp-dev mpc1-dev mpfr-dev openssl-dev perl postmarketos-installkernel " source=" linux-$_tag.tar.gz::https://github.com/msm8974-mainline/linux/archive/refs/tags/$_tag.tar.gz config-$_flavor.armv7 " builddir="$srcdir/linux-$pkgver-msm8974" prepare() { default_prepare cp "$srcdir/config-$_flavor.$CARCH" .config } build() { unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION=$((pkgrel + 1 )) } package() { mkdir -p "$pkgdir"/boot make zinstall modules_install dtbs_install \ ARCH="$_carch" \ INSTALL_PATH="$pkgdir"/boot \ INSTALL_MOD_PATH="$pkgdir" \ INSTALL_MOD_STRIP=1 \ INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source install -D "$builddir/include/config/kernel.release" \ "$pkgdir/usr/share/kernel/$_flavor/kernel.release" } sha512sums=" 2ae618f7d1d9a812951e3df47bc2e5f77336139cfca67ede27677d9cdd378df4f40a43d452d1028d20b887fd773f464853e00cd1932f0db0855bbb0105507d15 linux-v5.17.1-msm8974.tar.gz 8498222ecb4ed3d0f45b00820b5c0e11be614f49adfde83eede1665e4da537bdd3d414413ad1e593eb394a53dfdc599f9afd697268e8952ea0a0931adc029038 config-postmarketos-qcom-msm8974.armv7 "