# Maintainer: Martijn Braam # Co-Maintainer: Jan Jasper de Kroon pkgname=linux-pine64-pinephonepro pkgver=6.0.8 pkgrel=0 pkgdesc="Mainline kernel for the pinephone pro" arch="aarch64" _flavor="${pkgname#linux-}" url="https://kernel.org" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-community " makedepends=" bash bison findutils flex gmp-dev gzip linux-headers mpc1-dev mpfr-dev openssl-dev perl postmarketos-installkernel rsync xz " case "$CARCH" in aarch64*) _carch="arm64" ;; arm*) _carch="arm" ;; esac # Source _config="config-$_flavor.$CARCH" case $pkgver in *.*.*) _kernver=${pkgver%.0};; *.*) _kernver=$pkgver;; esac source=" https://gitlab.com/pine64-org/linux/-/archive/ppp-$pkgver-ppkb/linux-ppp-$pkgver-ppkb.tar.gz config-$_flavor.aarch64 " builddir="$srcdir/linux-ppp-$pkgver-ppkb" 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_MOD_PATH="$pkgdir" \ INSTALL_MOD_STRIP=1 \ INSTALL_PATH="$pkgdir"/boot \ INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs-$_flavor 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=" b529b8f52b02919e1b9f59cb483fbed095da12dd74425cbf18075dd2e04d6e243a29a4b9ac9f6f9897f7e5a500cf25444333c5f25d62a4ff2e83876ca15b8d47 linux-ppp-6.0.8-ppkb.tar.gz dd72255f253da0f5ac88ea794a909425250f8db9eba878cf063c1646502bb60625d766cbb67cc9d6bc1464d397dead127d6860f7c274545c787f93f10191b1cc config-pine64-pinephonepro.aarch64 "