pmaports/device/main/linux-purism-librem5/APKBUILD

77 lines
2 KiB
Text
Raw Normal View History

# Reference: <https://postmarketos.org/vendorkernel>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
# Co-Maintainer: Bhushan Shah <bshah@kde.org>
pkgname=linux-purism-librem5
pkgver=6.0.2
pkgrel=1
_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="
5fc6d1f6e944bdf3d0d3401ea8b86703547404843be478b9d15764155e46292096234d4c5ae3fc5ad6e61e3916b19763fa4b0120da6718084665a9f8db212aa5 linux-purism-librem5-6.0.2pureos1.tar.gz
765858ba4ab66468b409f64b43eb6c15f235f5f830f9b7f1a43a41d6fb09bb678baa99777fe59ee750045cd9e0911d59904e07c8dea992435ad7600d7d53a5ff config-purism-librem5.aarch64
"