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

53 lines
1.7 KiB
Text
Raw Normal View History

# Reference: <https://postmarketos.org/vendorkernel>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=linux-purism-librem5
pkgver=5.9.0_rc8
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
$_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="e56f74e73265809726be0b36c93cba607dd61adeb788abd74b7995a56c55c35a924e9e03852e31f807642b82a48ec2ba6e46d37cbc0851046f0923c436429b11 linux-purism-librem5-5.9.0_rc8+librem5.1.tar.gz
8b2c94fe28ea177093c7521462c6d0a765374756c262180df9c1ccc407a07f807b7eee763e17db7cf39d4c26b9412e273e711a3898b87416c932847caf306997 config-purism-librem5.aarch64"