# Maintainer: Martijn Braam # Co-Maintainer: Jan Jasper de Kroon pkgname=linux-pine64-pinephonepro pkgver=6.1_rc8 _pkgver=6.1-rc8 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 *.*rc*) _kernver=$_pkgver _rc=1;; *.*.*) _kernver=${pkgver%.0};; *.*) _kernver=$pkgver;; esac source=" https://gitlab.com/pine64-org/linux/-/archive/ppp-$_kernver/linux-ppp-$_kernver.tar.gz config-$_flavor.aarch64 " builddir="$srcdir/linux-ppp-$_kernver" 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=" 0f9b6130baec9032c30dc8bfec90a3be0834d0d746cf7dd393aa703c875c03faed959589eadd4dcfb2c848d71af2410401e3b36dffbdec85e31cd371c6783021 linux-ppp-6.1-rc8.tar.gz 96827f57ce614014d179b173a5ae2619156d5ed70e9b602638060657f22e1b37d7552c57ff9267594f0c2f3ff728a1472bb81ea81260962297831b757fd08613 config-pine64-pinephonepro.aarch64 "