[linux-postmarketos] enable maint. patching of kernel source (close #311) (#313)

This enables applying maint. release patchsets to the kernel source
tarball, in line with Alpine Linux's linux-vanilla APKBUILD.
This addresses #311.
This commit is contained in:
clayton craft 2017-08-02 09:48:06 -07:00 committed by Oliver Smith
parent ff968a751e
commit 20b8f6ea83

View file

@ -14,8 +14,11 @@ _config="config-${_flavor}.${CARCH}"
pkgname=linux-${_flavor}
pkgver=4.12.4
_kernver=${pkgver}
pkgrel=3
case $pkgver in
*.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=$pkgver;;
esac
pkgrel=4
arch="all"
pkgdesc="Mainline Linux for pmOS supported chipsets (OMAP)"
@ -30,9 +33,14 @@ source="
config-${_flavor}.x86_64
0001-rx51-drm-regression-workaround.patch
"
subpackages="$pkgname-dev::$CBUILD_ARCH"
license="GPL2"
if [ "${pkgver%.0}" = "$pkgver" ]; then
source="$source
https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/patch-$pkgver.xz"
fi
subpackages="$pkgname-dev::$CBUILD_ARCH"
license="GPL2"
_abi_release=${pkgver}
_carch=${CARCH}
case "$_carch" in
@ -50,6 +58,10 @@ ksrcdir="$srcdir/linux-$_kernver"
prepare() {
local _patch_failed=
cd "$ksrcdir"
if [ "$_kernver" != "$pkgver" ]; then
msg "Applying patch-$pkgver.xz"
unxz -c < "$srcdir"/patch-$pkgver.xz | patch -p1 -N || return 1
fi
# first apply patches in specified order
for i in $source; do
@ -171,7 +183,8 @@ dev() {
"$subpkgdir"/lib/modules/${_abi_release}/build
}
sha512sums="beb3c7644f12925301aedcc0cfc347cd086ce0486d3a4fe5a59fd4e00452c5495cec1eb7a294b83bd0d4a55238077d0b3766824b70e92e9b211b3f3146b6cc68 linux-4.12.4.tar.xz
sha512sums="8e81b41b253e63233e92948941f44c6482acb52aa3a3fd172f03a38a86f2c35b2ad4fd407acd1bc3964673eba344fe104d3a03e3ff4bf9cd1f22bd44263bd728 linux-4.12.tar.xz
3f4435ce0cf227e4ba64aa7153c913370c53069e34a376e453786d601b5a73706a3f44b002fab1b10a72dc94e896c1d8fb462c2b78e62ed69c468d98aa7220da config-postmarketos.armhf
c2bdaf8885dab4c3d3f96d856179138fed2d33cadcb9b33997238c8395a13eb8cb2b35f5f887339c5b47b34c8aa1bcd121059987601c1908103b66c23da478f0 config-postmarketos.x86_64
17c48bb7b4218297bd2be6faa5b6570ce1560a33385237a9962c0884d782c9a722a25a30077b6721d2943a9b98c29dcad6adfef718b0163c559c19a79519319b 0001-rx51-drm-regression-workaround.patch"
17c48bb7b4218297bd2be6faa5b6570ce1560a33385237a9962c0884d782c9a722a25a30077b6721d2943a9b98c29dcad6adfef718b0163c559c19a79519319b 0001-rx51-drm-regression-workaround.patch
8a6b72524050733c166524230d85f808275a65c28f06444350ebb8c64dd4cab666f8629ef1d1d2b6c25c1f36820a1fd114510af5a38509df55f9c3071543e647 patch-4.12.4.xz"