user/linux-rm: fix crossbuilding of dev subpackage

This commit is contained in:
Antoine Martin 2023-04-24 13:11:37 -04:00
parent ff6a0df1de
commit 4762c92107
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -4,7 +4,7 @@
pkgname=linux-rm
pkgver=5.4.70
_rmver=1.3.3
pkgrel=2
pkgrel=3
pkgdesc="Linux kernel with reMarkable patches"
url=https://github.com/reMarkable/linux
depends="initramfs-generator linux-firmware-brcm linux-firmware-cypress"
@ -30,7 +30,7 @@ for _i in $source; do
_f=${_f#config-changes-}
_flavors="$_flavors $_f"
[ "linux-$_f" != "$pkgname" ] && subpackages="$subpackages linux-$_f::$CTARGET_ARCH"
subpackages="$subpackages linux-$_f-dev:_dev:$CBUILD_ARCH"
subpackages="$subpackages linux-$_f-dev:_dev:$CTARGET_ARCH"
;;
esac
done
@ -210,6 +210,11 @@ _dev() {
# modules to believe this is the soruces
rm "$dir"/Makefile "$dir"/source
# scripts aren't being crossbuilt from some reason
if cross_compiling; then
for i in $(scanelf -R "$dir" | awk '{print $2}' | sed '1d'); do rm "$i"; done
fi
# copy the needed stuff from real sources
#
# this is taken from ubuntu kernel build script