# Maintainer: Svyatoslav Ryhel pkgname=linux-postmarketos-grate pkgver=6.6.9 pkgrel=1 pkgdesc="Linux kernel with experimental patches for Tegra" arch="armv7" url="https://gitlab.com/grate-driver/linux" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-community" makedepends="bash bison findutils flex postmarketos-installkernel openssl-dev perl gmp-dev mpc1-dev mpfr-dev xz" # Source _flavor="${pkgname#linux-}" _tag="v${pkgver//_/-}-stable" _carch="arm" _config="config-$_flavor.$arch" source="$pkgname-$_tag.tar.bz2::$url/-/archive/$_tag/linux-$_tag.tar.bz2 $_config" builddir="$srcdir/linux-$_tag" prepare() { default_prepare cp "$srcdir/config-$_flavor.$CARCH" .config } build() { unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" } 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"/boot/dtbs 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=" c6f2e1d02cdb8193f07e84d2662bdfcd77b727882e9b82a36215b0793ef004315865af2d83f4af0c89c1db7809bdffa6eac523ff5e871e1370c6b3cea58c3395 linux-postmarketos-grate-v6.6.9-stable.tar.bz2 62fbaf872206260984e7ba9c62bc38387e5e5213acb043192ca5393dba8bc303eda334f2e642d86c95d7c93ac2f1efb57f0ba6a91cd508cafa6b7ecd0d592279 config-postmarketos-grate.armv7 "