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

55 lines
1.9 KiB
Text
Raw Normal View History

# Reference: <https://postmarketos.org/vendorkernel>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=linux-purism-librem5
pkgver=5.9.5
pkgrel=0
_purismrel=1
# <kernel ver>.<purism kernel release>
_purismver=${pkgver}+librem5.$_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"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev
devicepkg-dev bison flex openssl-dev"
# Source
_repository="linux-next"
# 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/$_repository/-/archive/pureos/$_purismver/$_repository-pureos-$_purismver.tar.gz
8f11380ec32912370b8ae9134a0387a6f18862f7.patch
$_config
"
builddir="$srcdir/$_repository-pureos-$_purismver"
prepare() {
default_prepare
REPLACE_GCCH=0 \
. downstreamkernel_prepare
}
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/usr/share/dtb"
}
sha512sums="9b22e1e8fe16cc03c17c5fda1b39825723294ab99accde380f4d27f8053bba88f48c87ad4d91f4e99205e507e909fc04e28c4eeae2fc7f4e425fb183cb35ee38 linux-purism-librem5-5.9.5+librem5.1.tar.gz
9870bff4b187188b519b23264c2634ee4232011fed6d2f66a7b4971db354ac3dffa0e1552bd0dc953c66ec622e18ce8899fdbcfba94f60867fc5004d6da96753 8f11380ec32912370b8ae9134a0387a6f18862f7.patch
79d9b73d2f29deab02cb342a187ca97f2c9c39d3faf1142edcc75feb797329c87b07ffff08458d51b4fdcace28c3e68aa39b60ec11e16a658decd7e137f761bb config-purism-librem5.aarch64"