pmaports/device/main/linux-purism-librem5/APKBUILD
Alistair Francis 1993e0cc24
linux-purism-librem5: upgrade to 6.1.4pureos1 (MR 3809)
Signed-off-by: Alistair Francis <alistair@alistair23.me>

[ci:skip-build] already built successfully in CI
2023-01-17 15:11:52 -08:00

76 lines
2 KiB
Text

# Reference: <https://postmarketos.org/vendorkernel>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
# Co-Maintainer: Alistair Francis <alistair@alistair23.me>
pkgname=linux-purism-librem5
pkgver=6.1.4
pkgrel=0
_purismrel=1
# <kernel ver>.<purism kernel release>
_purismver=${pkgver}pureos$_purismrel
pkgdesc="Purism Librem 5 phone kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="purism-librem5"
url="https://source.puri.sm/Librem5/linux-next"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-community
"
makedepends="
bash
bison
devicepkg-dev
findutils
flex
installkernel
openssl-dev
perl
rsync
xz
"
install="$pkgname.post-upgrade"
# Source
_repository="linux"
# kconfig generated with: ARCH=arm64 make defconfig KBUILD_DEFCONFIG=librem5_defconfig
_config="config-$_flavor.$arch"
source="
$pkgname-$_purismver.tar.gz::https://source.puri.sm/Librem5/linux/-/archive/pureos/$_purismver/linux-pureos-$_purismver.tar.gz
$_config
"
builddir="$srcdir/$_repository-pureos-$_purismver"
prepare() {
default_prepare
REPLACE_GCCH=0 \
. downstreamkernel_prepare
# NOTE: only for generating a config based on Purism's defconfig, for rebasing...
# make ARCH="$_carch" CC="${CC:-gcc}" \
# defconfig KBUILD_DEFCONFIG=librem5_defconfig
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
LOCALVERSION=".$_purismrel"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
}
sha512sums="
8785ff52f4c074e96833d29c287f83bdfb80deaf4331ab2d8f29c15f6fbcc044a4835cd14be4cac8b04c7b710b1a2a0037a00acd49ae794f41830f60c88d3a4d linux-purism-librem5-6.1.4pureos1.tar.gz
18826512ca9b78d61bda5d892afa31404dccc4be4492ff9a29e69d8c68edebc2ed0c470d6fe8d577f3840a5db0f79221e55ee334dd9b841d2cfd0a2ebe59c22a config-purism-librem5.aarch64
"